com.unboundid.ldap.sdk
Enum SASLQualityOfProtection

java.lang.Object
  extended by java.lang.Enum<SASLQualityOfProtection>
      extended by com.unboundid.ldap.sdk.SASLQualityOfProtection
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SASLQualityOfProtection>

@ThreadSafety(level=COMPLETELY_THREADSAFE)
public enum SASLQualityOfProtection
extends java.lang.Enum<SASLQualityOfProtection>

This enum defines the set of supported SASL quality of protection values.


Enum Constant Summary
AUTH
          The quality of protection value that indicates that only authentication is to be performed, with no integrity or confidentiality protection for subsequent communication.
AUTH_CONF
          The quality of protection value that indicates that confidentiality protection will be provided for subsequent communication after authentication has completed.
AUTH_INT
          The quality of protection value that indicates that integrity protection will be provided for subsequent communication after authentication has completed.
 
Method Summary
static java.util.List<SASLQualityOfProtection> decodeQoPList(java.lang.String s)
          Decodes the provided string as a comma-delimited list of SASL quality of protection values.
static SASLQualityOfProtection forName(java.lang.String name)
          Retrieves the SASL quality of protection value with the given name.
 java.lang.String toString()
          Retrieves a string representation of this SASL quality of protection.
static java.lang.String toString(java.util.List<SASLQualityOfProtection> qopValues)
          Retrieves a string representation of the provided list of quality of protection values, as may be provided to a Java SaslClient.
static SASLQualityOfProtection valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SASLQualityOfProtection[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

AUTH

public static final SASLQualityOfProtection AUTH
The quality of protection value that indicates that only authentication is to be performed, with no integrity or confidentiality protection for subsequent communication.


AUTH_INT

public static final SASLQualityOfProtection AUTH_INT
The quality of protection value that indicates that integrity protection will be provided for subsequent communication after authentication has completed. While integrity protection does not ensure that third-party observers cannot decipher communication between the client and server, it does ensure that the communication cannot be altered in an undetectable manner.


AUTH_CONF

public static final SASLQualityOfProtection AUTH_CONF
The quality of protection value that indicates that confidentiality protection will be provided for subsequent communication after authentication has completed. This ensures that third-party observers will not be able to decipher communication between the client and server (i.e., that the communication will be encrypted).

Method Detail

values

public static SASLQualityOfProtection[] 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 (SASLQualityOfProtection c : SASLQualityOfProtection.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SASLQualityOfProtection valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

forName

public static SASLQualityOfProtection forName(java.lang.String name)
Retrieves the SASL quality of protection value with the given name.

Parameters:
name - The name of the SASL quality of protection value to retrieve. It must not be null.
Returns:
The requested SASL quality of protection value, or null if there is no value with the provided name.

decodeQoPList

public static java.util.List<SASLQualityOfProtection> decodeQoPList(java.lang.String s)
                                                             throws LDAPException
Decodes the provided string as a comma-delimited list of SASL quality of protection values.

Parameters:
s - The string to be decoded.
Returns:
The decoded list of SASL quality of protection values. It will not be null but may be empty if the provided string was null or empty.
Throws:
LDAPException - If the provided string cannot be decoded as a valid list of SASL quality of protection values.

toString

public java.lang.String toString()
Retrieves a string representation of this SASL quality of protection.

Overrides:
toString in class java.lang.Enum<SASLQualityOfProtection>
Returns:
A string representation of this SASL quality of protection.

toString

public static java.lang.String toString(java.util.List<SASLQualityOfProtection> qopValues)
Retrieves a string representation of the provided list of quality of protection values, as may be provided to a Java SaslClient.

Parameters:
qopValues - The list of values for which to create the string representation.
Returns:
A string representation of the provided list of quality of protection values, as may be provided to a Java SaslClient.