SmartFrog 3.10.000

org.smartfrog.sfcore.security
Class SFRMISocketFactory

java.lang.Object
  extended by java.rmi.server.RMISocketFactory
      extended by org.smartfrog.sfcore.security.SFRMISocketFactory
All Implemented Interfaces:
java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory

public class SFRMISocketFactory
extends java.rmi.server.RMISocketFactory

A class that wraps a client and server RMI socket factories.


Constructor Summary
SFRMISocketFactory(java.rmi.server.RMIClientSocketFactory csf, java.rmi.server.RMIServerSocketFactory ssf)
          Constructs a SFRMISocketFactory.
 
Method Summary
 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.
 
Methods inherited from class java.rmi.server.RMISocketFactory
getDefaultSocketFactory, getFailureHandler, getSocketFactory, setFailureHandler, setSocketFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SFRMISocketFactory

public SFRMISocketFactory(java.rmi.server.RMIClientSocketFactory csf,
                          java.rmi.server.RMIServerSocketFactory ssf)
Constructs a SFRMISocketFactory.

Parameters:
csf - A RMI factory to create client's sockets.
ssf - A RMI factory to create server's sockets.
Method Detail

createSocket

public java.net.Socket createSocket(java.lang.String host,
                                    int port)
                             throws java.io.IOException
Creates a client socket connected to the specified host and port.

Specified by:
createSocket in interface java.rmi.server.RMIClientSocketFactory
Specified by:
createSocket in class java.rmi.server.RMISocketFactory
Parameters:
host - the host name
port - the port number
Returns:
a socket connected to the specified host and port.
Throws:
java.io.IOException - if an I/O error occurs during socket creation
Since:
JDK1.1

createServerSocket

public java.net.ServerSocket createServerSocket(int port)
                                         throws java.io.IOException
Create a server socket on the specified port (port 0 indicates an anonymous port).

Specified by:
createServerSocket in interface java.rmi.server.RMIServerSocketFactory
Specified by:
createServerSocket in class java.rmi.server.RMISocketFactory
Parameters:
port - the port number
Returns:
the server socket on the specified port
Throws:
java.io.IOException - if an I/O error occurs during server socket creation
Since:
JDK1.1

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP