Serializable
, Comparable<AuthenticationMechanism>
public enum AuthenticationMechanism extends Enum<AuthenticationMechanism>
Enum Constant | Description |
---|---|
GSSAPI |
The GSSAPI mechanism.
|
MONGODB_CR |
Deprecated.
This mechanism was replaced by
SCRAM_SHA_1 in MongoDB 3.0, and is now deprecated |
MONGODB_X509 |
The MongoDB X.509 mechanism.
|
PLAIN |
The PLAIN mechanism.
|
SCRAM_SHA_1 |
The SCRAM-SHA-1 mechanism.
|
SCRAM_SHA_256 |
The SCRAM-SHA-256 mechanism.
|
Modifier and Type | Method | Description |
---|---|---|
static AuthenticationMechanism |
fromMechanismName(String mechanismName) |
Gets the mechanism by its name.
|
String |
getMechanismName() |
Get the mechanism name.
|
String |
toString() |
|
static AuthenticationMechanism |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static AuthenticationMechanism[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AuthenticationMechanism GSSAPI
public static final AuthenticationMechanism PLAIN
public static final AuthenticationMechanism MONGODB_X509
@Deprecated public static final AuthenticationMechanism MONGODB_CR
SCRAM_SHA_1
in MongoDB 3.0, and is now deprecatedpublic static final AuthenticationMechanism SCRAM_SHA_1
public static final AuthenticationMechanism SCRAM_SHA_256
public static AuthenticationMechanism[] values()
for (AuthenticationMechanism c : AuthenticationMechanism.values()) System.out.println(c);
public static AuthenticationMechanism valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getMechanismName()
public String toString()
toString
in class Enum<AuthenticationMechanism>
public static AuthenticationMechanism fromMechanismName(String mechanismName)
mechanismName
- the mechanism namegetMechanismName()