1. /*
  2. * @(#)RMIServerSocketFactory.java 1.4 01/11/29
  3. *
  4. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.rmi.server;
  8. import java.io.*;
  9. import java.net.*;
  10. /**
  11. * An <code>RMIServerSocketFactory</code> instance is used by the RMI runtime
  12. * in order to obtain server sockets for RMI calls. A remote object can be
  13. * associated with an <code>RMIServerSocketFactory</code> when it is
  14. * created/exported via the constructors or <code>exportObject</code> methods
  15. * of <code>java.rmi.server.UnicastRemoteObject</code> and
  16. * <code>java.rmi.activation.Activatable</code> .
  17. *
  18. * <p>An <code>RMIServerSocketFactory</code> instance associated with a remote
  19. * object is used to obtain the <code>ServerSocket</code> used to accept
  20. * incoming calls from clients.
  21. *
  22. * <p>An <code>RMIServerSocketFactory</code> instance can also be associated
  23. * with a remote object registry so that clients can use custom socket
  24. * communication with a remote object registry.
  25. *
  26. * @version 1.4, 11/29/01
  27. * @author Ann Wollrath
  28. * @author Peter Jones
  29. * @since JDK1.2
  30. * @see java.rmi.server.UnicastRemoteObject
  31. * @see java.rmi.activation.Activatable
  32. * @see java.rmi.registry.LocateRegistry
  33. */
  34. public interface RMIServerSocketFactory {
  35. /**
  36. * Create a server socket on the specified port (port 0 indicates
  37. * an anonymous port).
  38. * @param port the port number
  39. * @return the server socket on the specified port
  40. * @exception IOException if an I/O error occurs during server socket
  41. * creation
  42. * @since JDK1.2
  43. */
  44. public ServerSocket createServerSocket(int port)
  45. throws IOException;
  46. }