Class ReplSessionSecurity

java.lang.Object
org.opends.server.replication.protocol.ReplSessionSecurity

public final class ReplSessionSecurity extends Object
This class represents the security configuration for replication protocol sessions. It contains all the configuration required to use SSL, and it determines whether encryption should be enabled for a session to a given replication server.
  • Constructor Details

    • ReplSessionSecurity

      public ReplSessionSecurity(ServerContext serverContext)
      Create a ReplSessionSecurity instance.
      Parameters:
      serverContext - The directory server context
  • Method Details

    • createSslSocketForClientSession

      public SSLSocket createSslSocketForClientSession(Socket socket, com.forgerock.opendj.util.Host host, int soTimeout) throws ConfigException, IOException
      Creates a SSL socket from the provided socket for a client session.
      Parameters:
      socket - The connected socket.
      host - The host the socket is connected to.
      soTimeout - The socket timeout option to use for the protocol session.
      Returns:
      a SSL socket
      Throws:
      ConfigException - If the protocol session could not be established due to a configuration problem.
      IOException - If the protocol session could not be established for some other reason.
    • createSslSocketForServerSession

      public SSLSocket createSslSocketForServerSession(Socket socket, int soTimeout) throws ConfigException, IOException
      Creates a SSL socket from the provided socket for a server session.
      Parameters:
      socket - The connected socket.
      soTimeout - The socket timeout option to use for the protocol session.
      Returns:
      a SSL socket or null if the SSL socket cannot be created
      Throws:
      ConfigException - If the protocol session could not be established due to a configuration problem.
      IOException - If the protocol session could not be established for some other reason.
    • isSslEncryption

      public boolean isSslEncryption()
      Determine whether sessions to a given replication server should be encrypted.
      Returns:
      true if sessions to the given replication server should be encrypted, or false if they should not be encrypted.
    • toString

      public String toString()
      Overrides:
      toString in class Object