All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class java.rmi.server.RMISocketFactory
java.lang.Object
   |
   +----java.rmi.server.RMISocketFactory
  -  public abstract class RMISocketFactory
  -  extends Object
		
The RMISocketFactory is used by the RMI runtime in order to obtain
 client and server sockets for RMI calls. The default implementation
 of the socket factory performs a three-tiered approach to creating
 client sockets. First, a direct socket connection to the remote VM
 is attempted.  If that fails (due to a firewall), the runtime uses
 HTTP with the explicit port number of the server.  If the firewall
 does not allow this type of communication, then HTTP to a cgi-bin
 script on the server is used to POST the RMI call.
 An application may set the source of sockets for RMI. In this case,
 the application is responsible for offering up sockets that will
 penetrate a firewall.
   
  -   RMISocketFactory() RMISocketFactory()
-  
   
  -   createServerSocket(int) createServerSocket(int)
-   Create a server socket on the specified port (port 0 represents
 an anonymous port).
  
-   createSocket(String, int) createSocket(String, int)
-   Create a client socket connected to the specified host and port.
  
-   getFailureHandler() getFailureHandler()
-   Returns the handler for socket creation failure.
  
-   getSocketFactory() getSocketFactory()
-   Returns the socket factory used by RMI.
  
-   setFailureHandler(RMIFailureHandler) setFailureHandler(RMIFailureHandler)
-   Set the failure handler to be called by the RMI runtime if
 socket creation fails.
  
-   setSocketFactory(RMISocketFactory) setSocketFactory(RMISocketFactory)
-   Set the socket factory from which RMI gets sockets.
   
 RMISocketFactory
RMISocketFactory
 public RMISocketFactory()
   
 createSocket
createSocket
 public abstract Socket createSocket(String host,
                                     int port) throws IOException
  -  Create a client socket connected to the specified host and port.
 
 createServerSocket
createServerSocket
 public abstract ServerSocket createServerSocket(int port) throws IOException
  -  Create a server socket on the specified port (port 0 represents
 an anonymous port).
 
 setSocketFactory
setSocketFactory
 public static void setSocketFactory(RMISocketFactory fac) throws IOException
  -  Set the socket factory from which RMI gets sockets. The RMI
 socket factory can only be set once. Note: The RMISocketFactory
 may only be set if the current security manager allows setting
 a socket factory; if disallowed, a SecurityException will be
 thrown.
 
 getSocketFactory
getSocketFactory
 public static RMISocketFactory getSocketFactory()
  -  Returns the socket factory used by RMI.
 
 setFailureHandler
setFailureHandler
 public static void setFailureHandler(RMIFailureHandler fh)
  -  Set the failure handler to be called by the RMI runtime if
 socket creation fails.  The default implementation of this
 handler returns false (thus recreation of sockets is not
 attempted by the runtime).
 
 getFailureHandler
getFailureHandler
 public static RMIFailureHandler getFailureHandler()
  -  Returns the handler for socket creation failure.
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index
Submit a bug or feature