Class HostConfigurableSocketFactory
- java.lang.Object
-
- org.alfresco.util.remote.server.socket.HostConfigurableSocketFactory
-
- All Implemented Interfaces:
Serializable,RMIClientSocketFactory,RMIServerSocketFactory
public class HostConfigurableSocketFactory extends Object implements RMIServerSocketFactory, RMIClientSocketFactory, Serializable
This 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 ServerSocketcreateServerSocket(int port)SocketcreateSocket(String host, int port)booleanequals(Object obj)inthashCode()voidsetHost(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(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 Socket createSocket(String host, int port) throws IOException
- Specified by:
createSocketin interfaceRMIClientSocketFactory- Throws:
IOException
-
createServerSocket
public ServerSocket createServerSocket(int port) throws IOException
- Specified by:
createServerSocketin interfaceRMIServerSocketFactory- Throws:
IOException
-
-