ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.able
Class AbleSocketFactory

java.lang.Object
  |
  +--java.rmi.server.RMISocketFactory
        |
        +--com.ibm.able.AbleSocketFactory
All Implemented Interfaces:
java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory, java.io.Serializable

public class AbleSocketFactory
extends java.rmi.server.RMISocketFactory
implements java.io.Serializable

The AbleSocketFactory is a simple RMI socket factory that can be used by ABLE remote objects.

See Also:
Serialized Form

Constructor Summary
AbleSocketFactory()
           
 
Method Summary
 java.net.ServerSocket createServerSocket(int port)
          Create a ServerSocket on the specified port.
 java.net.Socket createSocket(java.lang.String host, int port)
          Create a client Socket connected to the specified host and port.
 boolean equals(java.lang.Object object)
          Test for equals.
 
Methods inherited from class java.rmi.server.RMISocketFactory
getDefaultSocketFactory, getFailureHandler, getSocketFactory, setFailureHandler, setSocketFactory
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbleSocketFactory

public AbleSocketFactory()
Method Detail

createSocket

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

This instance of Socket is used by the RMI runtime when either a client communicates remotely to a server, or the ServerSocket is processing a request from a remote client. (In this second case, an instance of Socket will be used for communications with the client, and the ServerSocket will continue to listen on its designated port for subsequent connect requests.)

A thirty second timeout is allowed.

Overrides:
createSocket in class java.rmi.server.RMISocketFactory
Parameters:
host - the host name
port - the port number
Throws:
java.io.IOException - if an I/O error occurs during client socket creation.

createServerSocket

public java.net.ServerSocket createServerSocket(int port)
                                         throws java.io.IOException
Create a ServerSocket on the specified port.

This instance of ServerSocket is used by the RMI runtime to accept incoming calls from clients.

Overrides:
createServerSocket in class java.rmi.server.RMISocketFactory
Parameters:
port - The port on which this instance of ServerSocket will listen for incoming calls from clients.
Returns:
ServerSocket representing newly created ServerSocket.
Throws:
java.io.IOException - if an I/O error occurs during server socket creation.

equals

public boolean equals(java.lang.Object object)
Test for equals. Having this method in a socket factory boosts performance.
Overrides:
equals in class java.lang.Object
Parameters:
object - An object to
Returns:
true if the specified object has the same class as this object, and false if the specified object is null or of another class.

ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003