Package org.apache.kafka.clients.admin
Enum Class ScramMechanism
- All Implemented Interfaces:
Serializable
,Comparable<ScramMechanism>
,Constable
Representation of a SASL/SCRAM Mechanism.
- See Also:
-
- KIP-554: Add Broker-side SCRAM Config API This code is duplicated in org.apache.kafka.common.security.scram.internals.ScramMechanism. The type field in both files must match and must not change. The type field is used both for passing ScramCredentialUpsertion and for the internal UserScramCredentialRecord. Do not change the type field.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ScramMechanism
fromMechanismName
(String mechanismName) static ScramMechanism
fromType
(byte type) byte
type()
static ScramMechanism
Returns the enum constant of this class with the specified name.static ScramMechanism[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
UNKNOWN
-
SCRAM_SHA_256
-
SCRAM_SHA_512
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
fromType
- Parameters:
type
- the type indicator- Returns:
- the instance corresponding to the given type indicator, otherwise
UNKNOWN
-
fromMechanismName
- Parameters:
mechanismName
- the SASL SCRAM mechanism name- Returns:
- the corresponding SASL SCRAM mechanism enum, otherwise
UNKNOWN
- See Also:
-
mechanismName
- Returns:
- the corresponding SASL SCRAM mechanism name
- See Also:
-
type
public byte type()- Returns:
- the type indicator for this SASL SCRAM mechanism
-