|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RMISocketFactory
RMISocketFactory
instance is used by the RMI runtime
in order to obtain client and server sockets for RMI calls. An
application may use the setSocketFactory
method to
request that the RMI runtime use its socket factory instance
instead of the default implementation.The default socket factory implementation used goes through 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.
Method Summary | |
abstract ServerSocket | createServerSocket(int port)
Create a server socket on the specified port (port 0 indicates an anonymous port). |
abstract Socket | createSocket(String host,
int port)
Create a client socket connected to the specified host and port. |
static RMISocketFactory | getDefaultSocketFactory()
Returns a reference to the default socket factory used by this RMI implementation. |
static RMIFailureHandler | getFailureHandler()
Returns the handler for socket creation failure. |
static RMISocketFactory | getSocketFactory()
Returns the socket factory used by RMI. |
static void | setFailureHandler(RMIFailureHandler fh)
Set the failure handler to be called by the RMI runtime if socket creation fails. |
static void | setSocketFactory(RMISocketFactory fac)
Set the socket factory from which RMI gets sockets. |
Methods inherited from class java.lang.Object | |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
Method Detail |
public abstract Socket createSocket(String host, int port) throws IOException
public abstract ServerSocket createServerSocket(int port) throws IOException
public static void setSocketFactory(RMISocketFactory fac) throws IOException
public static RMISocketFactory getSocketFactory()
public static RMISocketFactory getDefaultSocketFactory()
getSocketFactory
returns null.public static void setFailureHandler(RMIFailureHandler fh)
public static RMIFailureHandler getFailureHandler()
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |