Module org.snmp4j

Class UsmUserEntry

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<UsmUserEntry>

    public class UsmUserEntry
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Comparable<UsmUserEntry>
    The UsmUserEntry class represents a user in the Local Configuration Datastore (LCD).
    Version:
    3.0.6
    Author:
    Frank Fock
    See Also:
    Serialized Form
    • 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

      • setEngineID

        public void setEngineID​(OctetString engineID)
      • setUserName

        public void setUserName​(OctetString userName)
      • 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​(UsmUserEntry other)
        Compares this user entry with another one by engine ID then by their user names.
        Specified by:
        compareTo in interface java.lang.Comparable<UsmUserEntry>
        Parameters:
        other - 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