ch.elca.el4j.services.remoting.socketfactory
Class RMITimeoutSocketFactory

java.lang.Object
  extended by java.rmi.server.RMISocketFactory
      extended by ch.elca.el4j.services.remoting.socketfactory.RMITimeoutSocketFactory
All Implemented Interfaces:
Serializable, RMIClientSocketFactory, RMIServerSocketFactory

public class RMITimeoutSocketFactory
extends RMISocketFactory
implements Serializable

This class is a custom RMISocketFactory allowing to define a SocketTimeout for the RMI connection. The value of this timeout can be set in the spring configuration file rmi-timeout.xml (in main/resources/mandatory).

Author:
Dominik Zindel (DZI)
See Also:
Serialized Form
File-location:
RMITimeoutSocketFactory
Last check-in date:
2009-08-04 15:35:01 +0200 (Di, 04. Aug 2009) by swismer for revision 3883

Constructor Summary
RMITimeoutSocketFactory(int timeout)
          The constructor with the desired timeout as parameter.
 
Method Summary
 ServerSocket createServerSocket(int port)
          
 Socket createSocket(String host, int 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

RMITimeoutSocketFactory

public RMITimeoutSocketFactory(int timeout)
The constructor with the desired timeout as parameter.

Parameters:
timeout - The SocketTimeout.
Method Detail

createServerSocket

public ServerSocket createServerSocket(int port)
                                throws IOException

Specified by:
createServerSocket in interface RMIServerSocketFactory
Specified by:
createServerSocket in class RMISocketFactory
Throws:
IOException

createSocket

public Socket createSocket(String host,
                           int port)
                    throws IOException

Specified by:
createSocket in interface RMIClientSocketFactory
Specified by:
createSocket in class RMISocketFactory
Throws:
IOException


Copyright © 2005-2011 ELCA. All Rights Reserved.