Package org.opentcs.access.rmi.factories
Class SecureSocketFactoryProvider
java.lang.Object
org.opentcs.access.rmi.factories.SecureSocketFactoryProvider
- All Implemented Interfaces:
SocketFactoryProvider
public class SecureSocketFactoryProvider extends java.lang.Object implements SocketFactoryProvider
Provides instances of
RMIClientSocketFactory
and RMIServerSocketFactory
that are
implemented over the SSL or TLS protocols.
Since these factories don't support anonymous cipher suites a keystore on the server-side and a
truststore on the client-side is necessary.-
Constructor Summary
Constructors Constructor Description SecureSocketFactoryProvider(SslParameterSet sslParameterSet)
Creates a new instance. -
Method Summary
Modifier and Type Method Description java.rmi.server.RMIClientSocketFactory
getClientSocketFactory()
Returns aRMIClientSocketFactory
.java.rmi.server.RMIServerSocketFactory
getServerSocketFactory()
Returns aRMIServerSocketFactory
.
-
Constructor Details
-
SecureSocketFactoryProvider
Creates a new instance.- Parameters:
sslParameterSet
- The SSL parameters to be used for creating socket factories.
-
-
Method Details
-
getClientSocketFactory
public java.rmi.server.RMIClientSocketFactory getClientSocketFactory()Description copied from interface:SocketFactoryProvider
Returns aRMIClientSocketFactory
.- Specified by:
getClientSocketFactory
in interfaceSocketFactoryProvider
- Returns:
- A
RMIClientSocketFactory
. May benull
to indicate that a default factory implementation is to be used.
-
getServerSocketFactory
public java.rmi.server.RMIServerSocketFactory getServerSocketFactory()Description copied from interface:SocketFactoryProvider
Returns aRMIServerSocketFactory
.- Specified by:
getServerSocketFactory
in interfaceSocketFactoryProvider
- Returns:
- A
RMIServerSocketFactory
. May benull
to indicate that a default factory implementation is to be used.
-