Enum SaslMechanisms
- java.lang.Object
-
- java.lang.Enum<SaslMechanisms>
-
- org.apache.qpid.protonj2.engine.sasl.client.SaslMechanisms
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<SaslMechanisms>
public enum SaslMechanisms extends java.lang.Enum<SaslMechanisms>
Enumeration of all SASL Mechanisms supported by the client, order should be from most secure to least secure.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANONYMOUSCRAM_MD5EXTERNALPLAINSCRAM_SHA_1SCRAM_SHA_256SCRAM_SHA_512XOAUTH2
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract MechanismcreateMechanism()Creates the object that implements the SASL Mechanism represented by this enumeration.abstract SymbolgetName()static booleanvalidate(java.lang.String mechanism)Given a mechanism name, validate that it is one of the mechanisms this client supports.static SaslMechanismsvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static SaslMechanismsvalueOf(Symbol mechanism)Returns the matchingSaslMechanismsenumeration value for the givenSymbolkey.static SaslMechanisms[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EXTERNAL
public static final SaslMechanisms EXTERNAL
-
SCRAM_SHA_512
public static final SaslMechanisms SCRAM_SHA_512
-
SCRAM_SHA_256
public static final SaslMechanisms SCRAM_SHA_256
-
SCRAM_SHA_1
public static final SaslMechanisms SCRAM_SHA_1
-
CRAM_MD5
public static final SaslMechanisms CRAM_MD5
-
PLAIN
public static final SaslMechanisms PLAIN
-
XOAUTH2
public static final SaslMechanisms XOAUTH2
-
ANONYMOUS
public static final SaslMechanisms ANONYMOUS
-
-
Method Detail
-
values
public static SaslMechanisms[] 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 (SaslMechanisms c : SaslMechanisms.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SaslMechanisms 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 namejava.lang.NullPointerException- if the argument is null
-
createMechanism
public abstract Mechanism createMechanism()
Creates the object that implements the SASL Mechanism represented by this enumeration.- Returns:
- a new SASL
Mechanismtype that will be used for authentication.
-
valueOf
public static SaslMechanisms valueOf(Symbol mechanism)
Returns the matchingSaslMechanismsenumeration value for the givenSymbolkey.- Parameters:
mechanism- The symbolic mechanism name to lookup.- Returns:
- the matching
SaslMechanismsfor the given Symbol value.
-
validate
public static boolean validate(java.lang.String mechanism)
Given a mechanism name, validate that it is one of the mechanisms this client supports.- Parameters:
mechanism- The mechanism name to validate- Returns:
- true if the name matches a supported SASL Mechanism
-
-