- All Implemented Interfaces:
Serializable
,Comparable<SecurityLevel>
,java.lang.constant.Constable
The
SecurityLevel
interface contains enumerated values
for the different security levels.- Version:
- 2.0
- Author:
- Frank Fock
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Authentication and no encryption.static final int
Authentication and encryption.static final int
No authentication and no encryption. -
Method Summary
Modifier and TypeMethodDescriptionstatic SecurityLevel
get
(int snmpValue) int
Gets the SNMP value of this security level.static SecurityLevel
Returns the enum constant of this class with the specified name.static SecurityLevel[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
undefined
-
noAuthNoPriv
-
authNoPriv
-
authPriv
-
-
Field Details
-
NOAUTH_NOPRIV
public static final int NOAUTH_NOPRIVNo authentication and no encryption. Anyone can create and read messages with this security level- See Also:
-
AUTH_NOPRIV
public static final int AUTH_NOPRIVAuthentication and no encryption. Only the one with the right authentication key can create messages with this security level, but anyone can read the contents of the message.- See Also:
-
AUTH_PRIV
public static final int AUTH_PRIVAuthentication and encryption. Only the one with the right authentication key can create messages with this security level, and only the one with the right encryption/decryption key can read the contents of the message.- See Also:
-
-
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
-
getSnmpValue
public int getSnmpValue()Gets the SNMP value of this security level.- Returns:
- 1 for noAuthNoPriv 2 for authNoPriv 3 for authPriv
-
get
-