|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.distribution.ConfigurableRMIClientSocketFactory
public final class ConfigurableRMIClientSocketFactory
Default socket timeouts are unlikely to be suitable for cache replication. Sockets should fail fast.
This class decorates the RMIClientSocketFactory so as to enable customisations to be placed on newly created sockets.
Constructor Summary | |
---|---|
ConfigurableRMIClientSocketFactory(Integer socketTimeoutMillis)
Construct a new socket factory with the given timeout. |
Method Summary | |
---|---|
Socket |
createSocket(String host,
int port)
Create a client socket connected to the specified host and port. |
boolean |
equals(Object object)
The standard hashCode method which is necessary for SocketFactory classes. |
static RMISocketFactory |
getConfiguredRMISocketFactory()
Return the JVM-level configured RMISocketFactory . |
int |
hashCode()
Implements the Object hashCode method. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigurableRMIClientSocketFactory(Integer socketTimeoutMillis)
socketTimeoutMillis
- Socket.setSoTimeout(int)
Method Detail |
---|
public Socket createSocket(String host, int port) throws IOException
Socket socket = new Socket(host, port, localInterface , 0);
createSocket
in interface RMIClientSocketFactory
host
- the host nameport
- the port number
IOException
- if an I/O error occurs during socket creationpublic int hashCode()
hashCode
in class Object
public boolean equals(Object object)
equals
in class Object
object
- the comparison object
public static RMISocketFactory getConfiguredRMISocketFactory()
RMISocketFactory
.
If a global socket factory has been set via the
RMISocketFactory.setSocketFactory(RMISocketFactory)
method then
that factory will be returned. Otherwise the default socket factory as
returned by RMISocketFactory.getDefaultSocketFactory()
is used
instead.
RMISocketFactory
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |