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