Enum Class ConnectionSecurity

java.lang.Object
java.lang.Enum<ConnectionSecurity>
org.forgerock.opendj.ldap.ConnectionSecurity
All Implemented Interfaces:
Serializable, Comparable<ConnectionSecurity>, java.lang.constant.Constable

public enum ConnectionSecurity extends Enum<ConnectionSecurity>
Indicates whether LDAP client connections should use SSL or StartTLS.
  • Enum Constant Details

    • NONE

      public static final ConnectionSecurity NONE
      LDAP client connection use no security.
    • STARTTLS

      public static final ConnectionSecurity STARTTLS
      LDAP client connection uses StartTLS for security.
    • SSL

      public static final ConnectionSecurity SSL
      LDAP client connection uses SSL for security. This protocol is also known as LDAPS.
  • Method Details

    • values

      public static ConnectionSecurity[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ConnectionSecurity valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isSecure

      public abstract boolean isSecure()
      Returns whether this connection security is considered secure.
      Returns:
      whether this connection security is considered secure
    • getProtocolScheme

      public abstract String getProtocolScheme()
      Returns the protocol scheme associated to this connection security.
      Returns:
      the protocol scheme associated to this connection security
    • connectionSecurity

      public static ConnectionSecurity connectionSecurity(boolean useSsl, boolean useStartTls)
      Returns the connection security equivalent to the provided useSsl and useStartTls boolean parameters.
      Parameters:
      useSsl - whether to use SSL
      useStartTls - whether to use startTLS
      Returns:
      the equivalent connection security value