public class RMIFixedPortFirewallSocketFactory
extends java.rmi.server.RMISocketFactory
Modifier and Type | Method and Description |
---|---|
java.net.ServerSocket |
createServerSocket(int port)
Create a server socket on the specified port (port 0 indicates an
anonymous port).
|
java.net.Socket |
createSocket(java.lang.String host,
int port)
Creates a client socket connected to the specified host and port.
|
static java.rmi.server.RMISocketFactory |
register(int port)
Register the factory
|
public java.net.ServerSocket createServerSocket(int port) throws java.io.IOException
createServerSocket
in interface java.rmi.server.RMIServerSocketFactory
createServerSocket
in class java.rmi.server.RMISocketFactory
port
- the port numberjava.io.IOException
- if an I/O error occurs during server socket
creationRMISocketFactory.createServerSocket(int)
public java.net.Socket createSocket(java.lang.String host, int port) throws java.io.IOException
createSocket
in interface java.rmi.server.RMIClientSocketFactory
createSocket
in class java.rmi.server.RMISocketFactory
host
- the host nameport
- the port numberjava.io.IOException
- if an I/O error occurs during socket creationRMISocketFactory.createSocket(java.lang.String, int)
public static java.rmi.server.RMISocketFactory register(int port) throws java.rmi.RemoteException
port
- given port number for exporting objectsjava.rmi.RemoteException
- if the registration is not possible