All Packages Class Hierarchy This Package Previous Next Index
Class sdsu.rmi.server.XorRMISocketFactory
java.lang.Object
|
+----java.rmi.server.RMISocketFactory
|
+----sdsu.rmi.server.XorRMISocketFactory
- public class XorRMISocketFactory
- extends RMISocketFactory
The RMISocketFactory is used by the RMI runtime in order to obtain
client and server sockets for RMI calls. This factory creates
XorSockets and XorServerSocket, which use the byte mask given
the constructor. To use Xor Sockets in an RMI application
execute the following code before creating a remote object
on both the client and server side:
try
{
RMISocketFactory.setSocketFactory(
new XorRMISocketFactory( (byte) 0x1A ) );
}
catch (IOException factoryError )
{
System.err.println( "setSocketFactory failed: " +
factoryError );
}
Based on example found at:
http://java.sun.com/products/jdk/1.2/docs/guide/rmi/copy/rmisocketfactory.doc.html
- Version:
- 1.0 14 Feb 1998
- Author:
- Roger Whitney
(whitney@cs.sdsu.edu)
-
XorRMISocketFactory(byte)
- Create a new socket factory with the given
byte mask to be used in the XorSockets.
-
createServerSocket(int)
- Create a server socket on the specified port (port 0 represents
an anonymous port).
-
createSocket(String, int)
- Create a client socket connected to the specified host and port.
XorRMISocketFactory
public XorRMISocketFactory(byte mask)
- Create a new socket factory with the given
byte mask to be used in the XorSockets.
createSocket
public Socket createSocket(String host,
int port) throws IOException
- Create a client socket connected to the specified host and port.
- Throws: IOException
- if an I/O error occurs.
- Overrides:
- createSocket in class RMISocketFactory
createServerSocket
public ServerSocket createServerSocket(int port) throws IOException
- Create a server socket on the specified port (port 0 represents
an anonymous port).
- Throws: IOException
- if an I/O error occurs.
- Overrides:
- createServerSocket in class RMISocketFactory
All Packages Class Hierarchy This Package Previous Next Index