org.apache.jcs.auxiliary.remote.server
Class TimeoutConfigurableRMIScoketFactory

java.lang.Object
  extended by java.rmi.server.RMISocketFactory
      extended by org.apache.jcs.auxiliary.remote.server.TimeoutConfigurableRMIScoketFactory
All Implemented Interfaces:
Serializable, RMIClientSocketFactory, RMIServerSocketFactory

public class TimeoutConfigurableRMIScoketFactory
extends RMISocketFactory
implements Serializable

This can be injected into the the remote cache server as follows:

 jcs.remotecache.customrmisocketfactory=org.apache.jcs.auxiliary.remote.server.TimeoutConfigurableRMIScoketFactory
 jcs.remotecache.customrmisocketfactory.readTimeout=5000
 jcs.remotecache.customrmisocketfactory.openTimeout=5000
 

See Also:
Serialized Form

Constructor Summary
TimeoutConfigurableRMIScoketFactory()
           
 
Method Summary
 ServerSocket createServerSocket(int port)
           
 Socket createSocket(String host, int port)
           
 int getOpenTimeout()
           
 int getReadTimeout()
           
 void setOpenTimeout(int openTimeout)
           
 void setReadTimeout(int readTimeout)
           
 
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

TimeoutConfigurableRMIScoketFactory

public TimeoutConfigurableRMIScoketFactory()
Method Detail

createServerSocket

public ServerSocket createServerSocket(int port)
                                throws IOException
Specified by:
createServerSocket in interface RMIServerSocketFactory
Specified by:
createServerSocket in class RMISocketFactory
Parameters:
port -
Returns:
ServerSocket
Throws:
IOException

createSocket

public Socket createSocket(String host,
                           int port)
                    throws IOException
Specified by:
createSocket in interface RMIClientSocketFactory
Specified by:
createSocket in class RMISocketFactory
Parameters:
host -
port -
Returns:
Socket
Throws:
IOException

setReadTimeout

public void setReadTimeout(int readTimeout)
Parameters:
readTimeout - the readTimeout to set

getReadTimeout

public int getReadTimeout()
Returns:
the readTimeout

setOpenTimeout

public void setOpenTimeout(int openTimeout)
Parameters:
openTimeout - the openTimeout to set

getOpenTimeout

public int getOpenTimeout()
Returns:
the openTimeout


Copyright © 2002-2012 Apache Software Foundation. All Rights Reserved.