Class AgentXRegEntry<A extends org.snmp4j.smi.Address>

java.lang.Object
org.snmp4j.agent.agentx.master.AgentXRegEntry<A>
Type Parameters:
A - the address type of the associated master session.
All Implemented Interfaces:
Serializable, Comparable<AgentXRegEntry<A>>

public class AgentXRegEntry<A extends org.snmp4j.smi.Address> extends Object implements Comparable<AgentXRegEntry<A>>, Serializable
AgentXRegEntry represents an entry in the AgentX master agent registry.
See Also:
  • Constructor Details

    • AgentXRegEntry

      public AgentXRegEntry(AgentXMasterSession<A> session, AgentXRegion region, int priority, org.snmp4j.smi.OctetString context, int timeout)
      Creates a new registry entry.
      Parameters:
      session - the session associated with the entry.
      region - the region to register.
      priority - the priority (default is 127) of the registration.
      context - the SNMPv3 context.
      timeout - the region timeout in seconds.
  • Method Details

    • getContext

      public org.snmp4j.smi.OctetString getContext()
      Gets the context.
      Returns:
      the SNMPv3 context associated with the region.
    • getPriority

      public int getPriority()
      Gets the priority of the registry entry.
      Returns:
      the priority (lower value takes precedence)
    • getRegion

      public AgentXRegion getRegion()
      Gets the MIB region registered.
      Returns:
      the MIB region registered.
    • getSession

      public AgentXMasterSession<A> getSession()
      Gets the AgentXSession.
      Returns:
      the AgentX session that registered this region.
    • getSpecific

      public int getSpecific()
      Gets the specific index (= the length of the lower bound OID).
      Returns:
      the index that identifies how specific this region is (the highe the value the more specific).
    • getTimeout

      public int getTimeout()
      Gets the timeout for this region registration.
      Returns:
      the timeout in seconds.
    • compareTo

      public int compareTo(AgentXRegEntry<A> other)
      Compares this object with the specified object for order.
      Specified by:
      compareTo in interface Comparable<A extends org.snmp4j.smi.Address>
      Parameters:
      other - the AgentXRegEntry to be compared.
      Returns:
      a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getId

      public org.snmp4j.smi.OID getId()
      Gets the index ID of the region.
      Returns:
      the index ID.
    • setId

      public void setId(org.snmp4j.smi.OID id)
      Sets the index OID associated with this region entry.
      Parameters:
      id - an index OID.
    • toString

      public String toString()
      Overrides:
      toString in class Object