An SslRMIServerSocketFactory instance is used by the RMI
runtime in order to obtain server sockets for RMI calls via SSL.
This class implements RMIServerSocketFactory over
the Secure Sockets Layer (SSL) or Transport Layer Security (TLS)
protocols.
This class creates SSL sockets using the default
SSLSocketFactory (see SSLSocketFactory#getDefault) or the default
SSLServerSocketFactory (see SSLServerSocketFactory#getDefault) unless the
constructor taking an SSLContext is
used in which case the SSL sockets are created using
the SSLSocketFactory returned by
SSLContext#getSocketFactory or the
SSLServerSocketFactory returned by
SSLContext#getServerSocketFactory.
When an SSLContext is not supplied all the instances of this
class share the same keystore, and the same truststore (when client
authentication is required by the server). This behavior can be modified
by supplying an already initialized SSLContext instance.
javax.net.ssl.SSLSocketFactory , javax.net.ssl.SSLServerSocketFactory , javax.rmi.ssl.SslRMIClientSocketFactory
| Modifier and Type | Field and Description |
|---|---|
| private SSLContext | |
| private static SSLSocketFactory | |
| private final String[] | |
| private List | |
| private final String[] | |
| private List | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | SslRMIServerSocketFactory()
Creates a new |
| public | SslRMIServerSocketFactory(String[]
names of all the cipher suites to
enable on SSL connections accepted by server sockets created by
this factory, or enabledCipherSuites, String[] null to use the cipher suites
that are enabled by defaultnames of all the protocol versions to
enable on SSL connections accepted by server sockets created by
this factory, or enabledProtocols, boolean null to use the protocol versions
that are enabled by defaulttrue to require client
authentication on SSL connections accepted by server sockets
created by this factory; false to not require
client authenticationCreates a new |
| public | SslRMIServerSocketFactory(SSLContext
the SSL context to be used for creating SSL sockets.
If context, String[] context is null the default SSLSocketFactory
or the default SSLServerSocketFactory will be used to
create SSL sockets. Otherwise, the socket factory returned by
SSLContext.getSocketFactory() or
SSLContext.getServerSocketFactory() will be used instead.names of all the cipher suites to
enable on SSL connections accepted by server sockets created by
this factory, or enabledCipherSuites, String[] null to use the cipher suites
that are enabled by defaultnames of all the protocol versions to
enable on SSL connections accepted by server sockets created by
this factory, or enabledProtocols, boolean null to use the protocol versions
that are enabled by defaulttrue to require client
authentication on SSL connections accepted by server sockets
created by this factory; false to not require
client authenticationCreates a new |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| public ServerSocket | createServerSocket(int port)
Implements java. Creates a server socket that accepts SSL connections configured according to this factory's SSL socket configuration parameters. |
| public boolean | equals(Object obj)
Overrides java. Indicates whether some other object is "equal to" this one. |
| private static synchronized SSLSocketFactory | |
| public final String[] | Returns: an array of cipher suites enabled, ornullReturns the names of the cipher suites enabled on SSL
connections accepted by server sockets created by this factory,
or |
| public final String[] | Returns: an array of protocol versions enabled, ornullReturns the names of the protocol versions enabled on SSL
connections accepted by server sockets created by this factory,
or |
| public final boolean | Returns: true if client authentication is requiredReturns |
| public int | Returns: a hash code value for thisSslRMIServerSocketFactory.Overrides java. Returns a hash code value for this
|
| context | back to summary |
|---|---|
| private SSLContext context | |
| defaultSSLSocketFactory | back to summary |
|---|---|
| private static SSLSocketFactory defaultSSLSocketFactory | |
| enabledCipherSuites | back to summary |
|---|---|
| private final String[] enabledCipherSuites | |
| enabledCipherSuitesList | back to summary |
|---|---|
| private List<String> enabledCipherSuitesList | |
| enabledProtocols | back to summary |
|---|---|
| private final String[] enabledProtocols | |
| enabledProtocolsList | back to summary |
|---|---|
| private List<String> enabledProtocolsList | |
| needClientAuth | back to summary |
|---|---|
| private final boolean needClientAuth | |
| SslRMIServerSocketFactory | back to summary |
|---|---|
| public SslRMIServerSocketFactory() Creates a new SSL connections accepted by server sockets created by this factory have the default cipher suites and protocol versions enabled and do not require client authentication. | |
| SslRMIServerSocketFactory | back to summary |
|---|---|
| public SslRMIServerSocketFactory(String[] enabledCipherSuites, String[] enabledProtocols, boolean needClientAuth) throws IllegalArgumentException Creates a new
| |
| SslRMIServerSocketFactory | back to summary |
|---|---|
| public SslRMIServerSocketFactory(SSLContext context, String[] enabledCipherSuites, String[] enabledProtocols, boolean needClientAuth) throws IllegalArgumentException Creates a new
| |
| checkParameters | back to summary |
|---|---|
| private boolean checkParameters(SslRMIServerSocketFactory that) | |
| createServerSocket | back to summary |
|---|---|
| public ServerSocket createServerSocket(int port) throws IOException Implements java. Creates a server socket that accepts SSL connections configured according to this factory's SSL socket configuration parameters.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Indicates whether some other object is "equal to" this one. Two A subclass should override this method (as well as
| |
| getDefaultSSLSocketFactory | back to summary |
|---|---|
| private static synchronized SSLSocketFactory getDefaultSSLSocketFactory() | |
| getEnabledCipherSuites | back to summary |
|---|---|
| public final String[] getEnabledCipherSuites() Returns the names of the cipher suites enabled on SSL
connections accepted by server sockets created by this factory,
or
| |
| getEnabledProtocols | back to summary |
|---|---|
| public final String[] getEnabledProtocols() Returns the names of the protocol versions enabled on SSL
connections accepted by server sockets created by this factory,
or
| |
| getNeedClientAuth | back to summary |
|---|---|
| public final boolean getNeedClientAuth() Returns
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns a hash code value for this
| |