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