Package org.opends.server.protocols.jmx
Class DirectoryRMIServerSocketFactory
- java.lang.Object
-
- org.opends.server.protocols.jmx.DirectoryRMIServerSocketFactory
-
- All Implemented Interfaces:
RMIServerSocketFactory
public class DirectoryRMIServerSocketFactory extends Object implements RMIServerSocketFactory
ADirectoryRMIServerSocketFactoryinstance is used by the RMI runtime in order to obtain server sockets for RMI calls via SSL.This class implements
RMIServerSocketFactoryover the Secure Sockets Layer (SSL) or Transport Layer Security (TLS) protocols.
-
-
Constructor Summary
Constructors Constructor Description DirectoryRMIServerSocketFactory(SSLSocketFactory sslSocketFactory, boolean needClientCertificate, InetAddress listenAddress)Constructs a newDirectoryRMIServerSocketFactorywith the specified SSL socket configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerSocketcreateServerSocket(int port)Creates a server socket that accepts SSL connections configured according to this factory's SSL socket configuration parameters.booleanequals(Object obj)Indicates whether some other object is "equal to" this one.booleangetNeedClientCertificate()Returnstrueif client authentication is required on SSL connections accepted by server sockets created by this factory.inthashCode()Returns a hash code value for thisCacaoRMIServerSocketFactory.
-
-
-
Constructor Detail
-
DirectoryRMIServerSocketFactory
public DirectoryRMIServerSocketFactory(SSLSocketFactory sslSocketFactory, boolean needClientCertificate, InetAddress listenAddress)
Constructs a newDirectoryRMIServerSocketFactorywith the specified SSL socket configuration.- Parameters:
sslSocketFactory- the SSL socket factory to be used by this factoryneedClientCertificate-trueto require client authentication on SSL connections accepted by server sockets created by this factory;falseto not require client authentication.listenAddress- the address the server sockets created by this factory listen on
-
-
Method Detail
-
getNeedClientCertificate
public final boolean getNeedClientCertificate()
Returns
trueif client authentication is required on SSL connections accepted by server sockets created by this factory.- Returns:
trueif client authentication is required- See Also:
SSLSocket.setNeedClientAuth(boolean)
-
createServerSocket
public ServerSocket createServerSocket(int port) throws IOException
Creates a server socket that accepts SSL connections configured according to this factory's SSL socket configuration parameters.- Specified by:
createServerSocketin interfaceRMIServerSocketFactory- Parameters:
port- the port number the socket listens to- Returns:
- a server socket
- Throws:
IOException- if the socket cannot be created
-
equals
public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.
Two
CacaoRMIServerSocketFactoryobjects 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.
-
-