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
ConstructorDescriptionAgentXRegEntry
(AgentXMasterSession<A> session, AgentXRegion region, int priority, org.snmp4j.smi.OctetString context, int timeout) Creates a new registry entry. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(AgentXRegEntry<A> other) Compares this object with the specified object for order.boolean
org.snmp4j.smi.OctetString
Gets the context.org.snmp4j.smi.OID
getId()
Gets the index ID of the region.int
Gets the priority of the registry entry.Gets the MIB region registered.Gets theAgentXSession
.int
Gets the specific index (= the length of the lower boundOID
).int
Gets the timeout for this region registration.int
hashCode()
void
setId
(org.snmp4j.smi.OID id) Sets the indexOID
associated 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:
compareTo
in 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 indexOID
associated with this region entry.- Parameters:
id
- an index OID.
-
toString
-