org.opends.server.protocols.jmx
Class DirectoryRMIServerSocketFactory

java.lang.Object
  extended by org.opends.server.protocols.jmx.DirectoryRMIServerSocketFactory
All Implemented Interfaces:
java.rmi.server.RMIServerSocketFactory

public class DirectoryRMIServerSocketFactory
extends java.lang.Object
implements java.rmi.server.RMIServerSocketFactory

A 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 Summary
DirectoryRMIServerSocketFactory(javax.net.ssl.SSLSocketFactory sslSocketFactory, boolean needClientCertificate)
          Constructs a new DirectoryRMIServerSocketFactory with the specified SSL socket configuration.
 
Method Summary
 java.net.ServerSocket createServerSocket(int port)
          Creates a server socket that accepts SSL connections configured according to this factory's SSL socket configuration parameters.
 boolean equals(java.lang.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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryRMIServerSocketFactory

public DirectoryRMIServerSocketFactory(javax.net.ssl.SSLSocketFactory sslSocketFactory,
                                       boolean needClientCertificate)
Constructs a new DirectoryRMIServerSocketFactory with the specified SSL socket configuration.

Parameters:
sslSocketFactory - the SSL socket factory to be used by this factory
needClientCertificate - true to require client authentication on SSL connections accepted by server sockets created by this factory; false to not require client authentication.
Method Detail

getNeedClientCertificate

public final boolean getNeedClientCertificate()

Returns true if client authentication is required on SSL connections accepted by server sockets created by this factory.

Returns:
true if client authentication is required
See Also:
SSLSocket.setNeedClientAuth(boolean)

createServerSocket

public java.net.ServerSocket createServerSocket(int port)
                                         throws java.io.IOException
Creates a server socket that accepts SSL connections configured according to this factory's SSL socket configuration parameters.

Specified by:
createServerSocket in interface java.rmi.server.RMIServerSocketFactory
Parameters:
port - the port number the socket listens to
Returns:
a server socket
Throws:
java.io.IOException - if the socket cannot be created

equals

public boolean equals(java.lang.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.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument false otherwise.

hashCode

public int hashCode()

Returns a hash code value for this CacaoRMIServerSocketFactory.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this CacaoRMIServerSocketFactory.