com.rmidoves
Class ClientRmiDovesSocketFactory

java.lang.Object
  |
  +--java.rmi.server.RMISocketFactory
        |
        +--com.rmidoves.ClientRmiDovesSocketFactory
All Implemented Interfaces:
java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory

public class ClientRmiDovesSocketFactory
extends java.rmi.server.RMISocketFactory

A ClientRmiDovesSocketFactory is a custom RMI socket factory, that provides sockets for "CONNECT", "HTTP-TO-PORT" and 'no tunneling" mode

In the "CONNECT" and 'no-tunneling' mode it also faciltate RMI "callback"

Version:
1.1, Sep 11,2003

Field Summary
static int CALL_BACK_CREATE_SERVER_SOCKET_DELAY
           
static int CONNECT_TUNNELING_MODE
          Field
static int HTTP_TO_PORT_TUNNELING_MODE
          Field
static java.lang.String licensedTo
           
static int NO_TUNNELING_MODE
          Field
 
Constructor Summary
ClientRmiDovesSocketFactory()
          Constructs
 
Method Summary
 java.net.ServerSocket createServerSocket(int port)
           
 java.net.Socket createSocket(java.lang.String host, int port)
          createSocket:
 boolean equals(java.lang.Object object)
          equals:
 java.util.Vector getProxies()
          getProxies:
 int getTunnelingMode()
          getTunnelingMode:
 int hashCode()
          hashCode:
static boolean isVerboseMode()
          isVerboseMode:
 void setCallBackMode(boolean b)
           
 void setProxies(java.util.Vector newProxies)
          setProxies:
 void setTunnelingMode(int tunnelingMode)
          setTunnelingMode:
static void setVerboseMode(boolean newVerboseMode)
          setVerboseMode:
 
Methods inherited from class java.rmi.server.RMISocketFactory
getDefaultSocketFactory, getFailureHandler, getSocketFactory, setFailureHandler, setSocketFactory
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

licensedTo

public static final java.lang.String licensedTo
See Also:
Constant Field Values

NO_TUNNELING_MODE

public static final int NO_TUNNELING_MODE
Field

See Also:
Constant Field Values

CONNECT_TUNNELING_MODE

public static final int CONNECT_TUNNELING_MODE
Field

See Also:
Constant Field Values

HTTP_TO_PORT_TUNNELING_MODE

public static final int HTTP_TO_PORT_TUNNELING_MODE
Field

See Also:
Constant Field Values

CALL_BACK_CREATE_SERVER_SOCKET_DELAY

public static int CALL_BACK_CREATE_SERVER_SOCKET_DELAY
Constructor Detail

ClientRmiDovesSocketFactory

public ClientRmiDovesSocketFactory()
Constructs

Method Detail

createSocket

public java.net.Socket createSocket(java.lang.String host,
                                    int port)
                             throws java.io.IOException
createSocket:

Specified by:
createSocket in interface java.rmi.server.RMIClientSocketFactory
Specified by:
createSocket in class java.rmi.server.RMISocketFactory
Parameters:
host -
port -
Returns:
socket
Throws:
java.io.IOException

createServerSocket

public java.net.ServerSocket createServerSocket(int port)
                                         throws java.io.IOException
Specified by:
createServerSocket in interface java.rmi.server.RMIServerSocketFactory
Specified by:
createServerSocket in class java.rmi.server.RMISocketFactory
Parameters:
port -
Returns:
a server socket for the specified port
Throws:
java.io.IOException

equals

public boolean equals(java.lang.Object object)
equals:

Overrides:
equals in class java.lang.Object
Parameters:
object -
Returns:
true/false

hashCode

public int hashCode()
hashCode:

Overrides:
hashCode in class java.lang.Object
Returns:
hashcode

setTunnelingMode

public void setTunnelingMode(int tunnelingMode)
setTunnelingMode:

Parameters:
tunnelingMode -

getTunnelingMode

public int getTunnelingMode()
getTunnelingMode:

Returns:
mode:NO_TUNNELING_MODE or CONNECT_TUNNELING_MODE or HTTP_TO_PORT_TUNNELING_MODE

setVerboseMode

public static void setVerboseMode(boolean newVerboseMode)
setVerboseMode:

Parameters:
newVerboseMode -

isVerboseMode

public static boolean isVerboseMode()
isVerboseMode:

Returns:
true if the factory is in the tracing mode

setCallBackMode

public void setCallBackMode(boolean b)

setProxies

public void setProxies(java.util.Vector newProxies)
                throws java.lang.IllegalArgumentException
setProxies:

Throws:
java.lang.IllegalArgumentException

getProxies

public java.util.Vector getProxies()
getProxies:

Returns:
vector of strings with following format "hostname:port"