Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7076394

Update RMI documentation to clarify that remote objects are exported to the wildcard address

    XMLWordPrintable

Details

    • generic
    • generic

    Description

      If UnicastRemoteObject is extended without specifying a server socket factory then the remote object is exported to the wildcard address. This bug requests that the specification for these methods be clarified to make it clear that the object is exported to all local addresses. The javadoc should also be updated to include an example that uses a server socket factory such as the following:

         static class MyFactory implements RMIServerSocketFactory {
              private final InetAddress addr;
              MyFactory(InetAddress addr) {
                  this.addr = addr;
              }
              public ServerSocket createServerSocket(int port) throws IOException {
                  return new ServerSocket(port, 0, addr);
              }
              public int hashCode() {
                  return addr.hashCode();
              }
              public boolean equals(Object obj) {
                  if (obj == this) {
                      return true;
                  } else if (obj == null || getClass() != obj.getClass()) {
                      return false;
                  }
                  MyFactory other = (MyFactory) obj;
                  return addr.equals(other.addr);
              }
          }

      Attachments

        Issue Links

          Activity

            People

              rgallard Raymond Gallardo
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: