Class SubAgentXIndexRegistryEntry
java.lang.Object
org.snmp4j.agent.agentx.master.index.IndexRegistryEntry
org.snmp4j.agent.agentx.subagent.index.SubAgentXIndexRegistryEntry
- All Implemented Interfaces:
Comparable<IndexRegistryEntry>
The
SubAgentXIndexRegistryEntry is a sub-agent specific IndexRegistryEntry that
creates SubAgentXIndexEntry instances to track index allocations on the sub-agent side.-
Field Summary
Fields inherited from class IndexRegistryEntry
indexValues, usedValues -
Constructor Summary
ConstructorsConstructorDescriptionSubAgentXIndexRegistryEntry(org.snmp4j.smi.OctetString context, org.snmp4j.smi.VariableBinding indexType) Creates a newSubAgentXIndexRegistryEntryfor the given context and index type. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddUsed(IndexEntry entry) Add a used index value to the used registry.protected voidduplicateAllocation(IndexEntry entry) Called when an already allocated index instance is allocated again.protected IndexEntrynewIndexEntry(int sessionID, org.snmp4j.smi.Variable indexValue) Creates a newIndexEntryfor the given session and index value.protected booleanremoveEntry(IndexEntry entryKey) Remove an index value from the active index values.Methods inherited from class IndexRegistryEntry
allocate, anyIndex, compareTo, equals, getContext, getIndexType, hashCode, newIndex, release, release
-
Constructor Details
-
SubAgentXIndexRegistryEntry
public SubAgentXIndexRegistryEntry(org.snmp4j.smi.OctetString context, org.snmp4j.smi.VariableBinding indexType) Creates a newSubAgentXIndexRegistryEntryfor the given context and index type.- Parameters:
context- the SNMPv3 context.indexType- the index type.
-
-
Method Details
-
newIndexEntry
Description copied from class:IndexRegistryEntryCreates a newIndexEntryfor the given session and index value. Subclasses may override this factory method to provide a specialized index entry implementation.- Overrides:
newIndexEntryin classIndexRegistryEntry- Parameters:
sessionID- the ID of the session allocating the index.indexValue- the index value of the index instance.- Returns:
- a new
IndexEntry.
-
duplicateAllocation
Description copied from class:IndexRegistryEntryCalled when an already allocated index instance is allocated again. The default implementation does nothing; subclasses may override this method to react on duplicate allocations.- Overrides:
duplicateAllocationin classIndexRegistryEntry- Parameters:
entry- the index entry that has been allocated more than once.
-
addUsed
Description copied from class:IndexRegistryEntryAdd a used index value to the used registry.- Overrides:
addUsedin classIndexRegistryEntry- Parameters:
entry- the index value entry.
-
removeEntry
Description copied from class:IndexRegistryEntryRemove an index value from the active index values.- Overrides:
removeEntryin classIndexRegistryEntry- Parameters:
entryKey- the index value entry.- Returns:
trueif the removal was successful.
-