Enum SaslOutcome
- java.lang.Object
-
- java.lang.Enum<SaslOutcome>
-
- org.apache.qpid.protonj2.engine.sasl.SaslOutcome
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<SaslOutcome>
public enum SaslOutcome extends java.lang.Enum<SaslOutcome>
Represents the outcome of a SASL exchange
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract SaslCode
saslCode()
static SaslOutcome
valueOf(byte outcome)
Return a matching SASL Outcome from the given byte value.static SaslOutcome
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static SaslOutcome[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SASL_OK
public static final SaslOutcome SASL_OK
authentication succeeded
-
SASL_AUTH
public static final SaslOutcome SASL_AUTH
failed due to bad credentials
-
SASL_SYS
public static final SaslOutcome SASL_SYS
failed due to a system error
-
SASL_PERM
public static final SaslOutcome SASL_PERM
failed due to unrecoverable error
-
SASL_TEMP
public static final SaslOutcome SASL_TEMP
failed due to transient error
-
-
Method Detail
-
values
public static SaslOutcome[] 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 (SaslOutcome c : SaslOutcome.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SaslOutcome 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
-
saslCode
public abstract SaslCode saslCode()
- Returns:
- the low level
SaslCode
that defines the outcome of the SASL exchange.
-
valueOf
public static SaslOutcome valueOf(byte outcome)
Return a matching SASL Outcome from the given byte value.- Parameters:
outcome
- The byte value that is to be mapped to a SASL Outcome.- Returns:
- the
SaslOutcome
that matches the given value. - Throws:
java.lang.IllegalArgumentException
- if the given outcome value is unknown.
-
-