public class DirectoryRMIServerSocketFactory extends Object implements RMIServerSocketFactory
DirectoryRMIServerSocketFactory
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.
Constructor and Description |
---|
DirectoryRMIServerSocketFactory(SSLSocketFactory sslSocketFactory,
boolean needClientCertificate)
Constructs a new
DirectoryRMIServerSocketFactory with the specified SSL socket configuration. |
Modifier and Type | Method and Description |
---|---|
ServerSocket |
createServerSocket(int port)
Creates a server socket that accepts SSL connections configured according to this factory's SSL socket
configuration parameters.
|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
boolean |
getNeedClientCertificate()
Returns
true if client authentication is required on SSL connections accepted by server sockets
created by this factory. |
int |
hashCode()
Returns a hash code value for this
CacaoRMIServerSocketFactory . |
public DirectoryRMIServerSocketFactory(SSLSocketFactory sslSocketFactory, boolean needClientCertificate)
DirectoryRMIServerSocketFactory
with the specified SSL socket configuration.sslSocketFactory
- the SSL socket factory to be used by this factoryneedClientCertificate
- true
to require client authentication on SSL connections accepted by server sockets
created by this factory; false
to not require client authentication.public final boolean getNeedClientCertificate()
Returns true
if client authentication is required on SSL connections accepted by server sockets
created by this factory.
true
if client authentication is requiredSSLSocket.setNeedClientAuth(boolean)
public ServerSocket createServerSocket(int port) throws IOException
createServerSocket
in interface RMIServerSocketFactory
port
- the port number the socket listens toIOException
- if the socket cannot be createdpublic boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.
Two CacaoRMIServerSocketFactory
objects are equal if they have been constructed with the same SSL
socket configuration parameters.
A subclass should override this method (as well as hashCode()
) if it adds instance state that affects
equality.
Copyright © 2010–2017 ForgeRock AS. All rights reserved.