Package com.opencloud.rhino.management
Class HostRemappingSslRMIClientSocketFactory
- java.lang.Object
-
- javax.rmi.ssl.SslRMIClientSocketFactory
-
- com.opencloud.rhino.management.HostRemappingSslRMIClientSocketFactory
-
- All Implemented Interfaces:
Serializable
,RMIClientSocketFactory
public final class HostRemappingSslRMIClientSocketFactory extends SslRMIClientSocketFactory implements Serializable
An SslRMIClientSocketFactory that overrides the host string provided in a socket creation request with the host string provided during object construction. This works around issues where the JMXR Adaptor may be bound to multiple network interfaces on the server but there’s only one java.rmi.server.hostname system property, so a client may end up trying to connect to the wrong IP address during RMI setup.
The host string override this socket factory normally provides can be disabled, if necessary, in a client by setting the system property
rhino.jmxr.client_socket_factory.disable_override=true
.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
DISABLE_OVERRIDE_PROPERTY
-
Constructor Summary
Constructors Constructor Description HostRemappingSslRMIClientSocketFactory(String hostOverride)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Socket
createSocket(String host, int port)
-
Methods inherited from class javax.rmi.ssl.SslRMIClientSocketFactory
equals, hashCode
-
-
-
-
Field Detail
-
DISABLE_OVERRIDE_PROPERTY
public static final String DISABLE_OVERRIDE_PROPERTY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HostRemappingSslRMIClientSocketFactory
public HostRemappingSslRMIClientSocketFactory(String hostOverride)
-
-
Method Detail
-
createSocket
public Socket createSocket(String host, int port) throws IOException
- Specified by:
createSocket
in interfaceRMIClientSocketFactory
- Overrides:
createSocket
in classSslRMIClientSocketFactory
- Throws:
IOException
-
-