1. /*
  2. * @(#)RMIClientSocketFactory.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>RMIClientSocketFactory</code> instance is used by the RMI runtime
  15. * in order to obtain client sockets for RMI calls. A remote object can be
  16. * associated with an <code>RMIClientSocketFactory</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>RMIClientSocketFactory</code> instance associated with a remote
  22. * object will be downloaded to clients when the remote object's reference is
  23. * transmitted in an RMI call. This <code>RMIClientSocketFactory</code> will
  24. * be used to create connections to the remote object for remote method calls.
  25. *
  26. * <p>An <code>RMIClientSocketFactory</code> instance can also be associated
  27. * with a remote object registry so that clients can use custom socket
  28. * communication with a remote object registry.
  29. *
  30. * @version 1.7, 02/02/00
  31. * @author Ann Wollrath
  32. * @author Peter Jones
  33. * @since 1.2
  34. * @see java.rmi.server.UnicastRemoteObject
  35. * @see java.rmi.activation.Activatable
  36. * @see java.rmi.registry.LocateRegistry
  37. */
  38. public interface RMIClientSocketFactory {
  39. /**
  40. * Create a client socket connected to the specified host and port.
  41. * @param host the host name
  42. * @param port the port number
  43. * @return a socket connected to the specified host and port.
  44. * @exception IOException if an I/O error occurs during socket creation
  45. * @since 1.2
  46. */
  47. public Socket createSocket(String host, int port)
  48. throws IOException;
  49. }