Package org.snmp4j.agent.agentx.master
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 Summary
ConstructorsConstructorDescriptionAgentXRegEntry(AgentXMasterSession<A> session, AgentXRegion region, int priority, org.snmp4j.smi.OctetString context, int timeout) Creates a new registry entry. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(AgentXRegEntry<A> other) Compares this object with the specified object for order.booleanorg.snmp4j.smi.OctetStringGets the context.org.snmp4j.smi.OIDgetId()Gets the index ID of the region.intGets the priority of the registry entry.Gets the MIB region registered.Gets theAgentXSession.intGets the specific index (= the length of the lower boundOID).intGets the timeout for this region registration.inthashCode()voidsetId(org.snmp4j.smi.OID id) Sets the indexOIDassociated with this region entry.toString()
-
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
Gets the MIB region registered.- Returns:
- the MIB region registered.
-
getSession
Gets theAgentXSession.- Returns:
- the AgentX session that registered this region.
-
getSpecific
public int getSpecific()Gets the specific index (= the length of the lower boundOID).- 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
Compares this object with the specified object for order.- Specified by:
compareToin interfaceComparable<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
-
hashCode
public int hashCode() -
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 indexOIDassociated with this region entry.- Parameters:
id- an index OID.
-
toString
-