Class HostConfigurableSocketFactory
- java.lang.Object
-
- org.alfresco.util.remote.server.socket.HostConfigurableSocketFactory
-
- All Implemented Interfaces:
java.io.Serializable,java.rmi.server.RMIClientSocketFactory,java.rmi.server.RMIServerSocketFactory
public class HostConfigurableSocketFactory extends java.lang.Object implements java.rmi.server.RMIServerSocketFactory, java.rmi.server.RMIClientSocketFactory, java.io.SerializableThis Spring depended class allows to control the binding of a RMI Registry to some port and concrete local host, e.g.:localhost,192.168.0.1etc.Host may be configured with the-Djava.rmi.server.hostnamesystem property
NOTE: Please look at ALF-4357 for more information- Author:
- Dmitry Velichkevich
- See Also:
Spring dependence,RMIServerSocketFactory,RMIClientSocketFactory, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HostConfigurableSocketFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.ServerSocketcreateServerSocket(int port)java.net.SocketcreateSocket(java.lang.String host, int port)booleanequals(java.lang.Object obj)inthashCode()voidsetHost(java.lang.String host)voidsetRetries(int retries)How many retries to attempt if the socket is in use.voidsetRetryInterval(int retryInterval)How long to wait between retries, in miliseconds?
-
-
-
Method Detail
-
setHost
public void setHost(java.lang.String host)
-
setRetries
public void setRetries(int retries)
How many retries to attempt if the socket is in use. Default is zero (no retries)
-
setRetryInterval
public void setRetryInterval(int retryInterval)
How long to wait between retries, in miliseconds?
-
createSocket
public java.net.Socket createSocket(java.lang.String host, int port) throws java.io.IOException- Specified by:
createSocketin interfacejava.rmi.server.RMIClientSocketFactory- Throws:
java.io.IOException
-
createServerSocket
public java.net.ServerSocket createServerSocket(int port) throws java.io.IOException- Specified by:
createServerSocketin interfacejava.rmi.server.RMIServerSocketFactory- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-