edu.tum.cs.commons.net
Class SmartRMISocketFactory
java.lang.Object
java.rmi.server.RMISocketFactory
edu.tum.cs.commons.net.SmartRMISocketFactory
- All Implemented Interfaces:
- RMIClientSocketFactory, RMIServerSocketFactory
- Direct Known Subclasses:
- LocalhostRMISocketFactory
public class SmartRMISocketFactory
- extends RMISocketFactory
A RMISocketFactory that adjusts flags on the sockets used. One is
that for the server socket the reuse flag is set, which allows fast
reopening. Second, an optional timeout can be set.
- Version:
- $Rev: 28668 $
- Author:
- hummelb, $Author: heineman $
- Rating:
- GREEN Hash: 676BF40E769C33456EE7029EE0E3949A
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SmartRMISocketFactory
public SmartRMISocketFactory()
- Constructor. No timeout is set.
SmartRMISocketFactory
public SmartRMISocketFactory(int timeoutSeconds)
- Constructor
createSocket
public Socket createSocket(String host,
int port)
throws IOException
-
- Specified by:
createSocket in interface RMIClientSocketFactory- Specified by:
createSocket in class RMISocketFactory
- Throws:
IOException
createServerSocket
public ServerSocket createServerSocket(int port)
throws IOException
-
- Specified by:
createServerSocket in interface RMIServerSocketFactory- Specified by:
createServerSocket in class RMISocketFactory
- Throws:
IOException
TUM CCSM Commons - 2.7