org.snmp4j.security
Class UsmUserEntry

java.lang.Object
  extended by org.snmp4j.security.UsmUserEntry
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class UsmUserEntry
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

The UsmUserEntry class represents a user in the Local Configuration Datastore (LCD).

Version:
1.1
Author:
Frank Fock
See Also:
Serialized Form

Constructor Summary
UsmUserEntry()
          Creates a new user entry with empty engine ID and empty user.
UsmUserEntry(byte[] engineID, OctetString securityName, OID authProtocol, byte[] authKey, OID privProtocol, byte[] privKey)
          Creates a localized user entry.
UsmUserEntry(OctetString userName, OctetString engineID, UsmUser user)
          Creates a user with user name and associated UsmUser.
UsmUserEntry(OctetString userName, UsmUser user)
          Creates a user with user name and associated UsmUser.
 
Method Summary
 int compareTo(java.lang.Object o)
          Compares this user entry with another one by engine ID then by their user names.
 byte[] getAuthenticationKey()
           
 OctetString getEngineID()
           
 byte[] getPrivacyKey()
           
 OctetString getUserName()
           
 UsmUser getUsmUser()
           
 void setAuthenticationKey(byte[] authenticationKey)
           
 void setEngineID(OctetString engineID)
           
 void setPrivacyKey(byte[] privacyKey)
           
 void setUserName(OctetString userName)
           
 void setUsmUser(UsmUser usmUser)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UsmUserEntry

public UsmUserEntry()
Creates a new user entry with empty engine ID and empty user.


UsmUserEntry

public UsmUserEntry(OctetString userName,
                    UsmUser user)
Creates a user with user name and associated UsmUser.

Parameters:
userName - the user name of the new entry.
user - the UsmUser representing the security information of the user.

UsmUserEntry

public UsmUserEntry(OctetString userName,
                    OctetString engineID,
                    UsmUser user)
Creates a user with user name and associated UsmUser.

Parameters:
userName - the user name of the new entry.
engineID - the authoritative engine ID associated with the user.
user - the UsmUser representing the security information of the user.

UsmUserEntry

public UsmUserEntry(byte[] engineID,
                    OctetString securityName,
                    OID authProtocol,
                    byte[] authKey,
                    OID privProtocol,
                    byte[] privKey)
Creates a localized user entry.

Parameters:
engineID - the engine ID for which the users has bee localized.
securityName - the user and security name of the new entry.
authProtocol - the authentication protocol ID.
authKey - the authentication key.
privProtocol - the privacy protocol ID.
privKey - the privacy key.
Method Detail

getEngineID

public OctetString getEngineID()

setEngineID

public void setEngineID(OctetString engineID)

setUserName

public void setUserName(OctetString userName)

getUserName

public OctetString getUserName()

setUsmUser

public void setUsmUser(UsmUser usmUser)

getUsmUser

public UsmUser getUsmUser()

setAuthenticationKey

public void setAuthenticationKey(byte[] authenticationKey)

getAuthenticationKey

public byte[] getAuthenticationKey()

setPrivacyKey

public void setPrivacyKey(byte[] privacyKey)

getPrivacyKey

public byte[] getPrivacyKey()

compareTo

public int compareTo(java.lang.Object o)
Compares this user entry with another one by engine ID then by their user names.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - a UsmUserEntry instance.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Copyright 2005-2010 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.