org.snmp4j.security
Enum SecurityLevel

java.lang.Object
  extended by java.lang.Enum<SecurityLevel>
      extended by org.snmp4j.security.SecurityLevel
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SecurityLevel>

public enum SecurityLevel
extends java.lang.Enum<SecurityLevel>

The SecurityLevel interface contains enumerated values for the different security levels.

Version:
2.0
Author:
Frank Fock

Enum Constant Summary
authNoPriv
           
authPriv
           
noAuthNoPriv
           
undefined
           
 
Field Summary
static int AUTH_NOPRIV
          Authentication and no encryption.
static int AUTH_PRIV
          Authentication and encryption.
static int NOAUTH_NOPRIV
          No authentication and no encryption.
 
Method Summary
static SecurityLevel get(int snmpValue)
           
 int getSnmpValue()
          Gets the SNMP value of this security level.
static SecurityLevel valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SecurityLevel[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

undefined

public static final SecurityLevel undefined

noAuthNoPriv

public static final SecurityLevel noAuthNoPriv

authNoPriv

public static final SecurityLevel authNoPriv

authPriv

public static final SecurityLevel authPriv
Field Detail

NOAUTH_NOPRIV

public static final int NOAUTH_NOPRIV
No authentication and no encryption. Anyone can create and read messages with this security level

See Also:
Constant Field Values

AUTH_NOPRIV

public static final int AUTH_NOPRIV
Authentication 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:
Constant Field Values

AUTH_PRIV

public static final int AUTH_PRIV
Authentication 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:
Constant Field Values
Method Detail

values

public static SecurityLevel[] 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 (SecurityLevel c : SecurityLevel.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SecurityLevel 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 name
java.lang.NullPointerException - 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

public static SecurityLevel get(int snmpValue)

Copyright 2005-2011 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.