Enum ConnectionSecurity

    • Enum Constant Detail

      • 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 Detail

      • values

        public static ConnectionSecurity[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ConnectionSecurity c : ConnectionSecurity.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ConnectionSecurity valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type 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