Package org.forgerock.opendj.ldap
Enum ConnectionSecurity
- java.lang.Object
-
- java.lang.Enum<ConnectionSecurity>
-
- org.forgerock.opendj.ldap.ConnectionSecurity
-
- All Implemented Interfaces:
Serializable
,Comparable<ConnectionSecurity>
public enum ConnectionSecurity extends Enum<ConnectionSecurity>
Indicates whether LDAP client connections should use SSL or StartTLS.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ConnectionSecurity
connectionSecurity(boolean useSsl, boolean useStartTls)
Returns the connection security equivalent to the provideduseSsl
anduseStartTls
boolean parameters.abstract String
getProtocolScheme()
Returns the protocol scheme associated to this connection security.abstract boolean
isSecure()
Returns whether this connection security is considered secure.static ConnectionSecurity
valueOf(String name)
Returns the enum constant of this type with the specified name.static ConnectionSecurity[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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 nameNullPointerException
- 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 provideduseSsl
anduseStartTls
boolean parameters.- Parameters:
useSsl
- whether to use SSLuseStartTls
- whether to use startTLS- Returns:
- the equivalent connection security value
-
-