Class SubAgentXIndexRegistryEntry

java.lang.Object
org.snmp4j.agent.agentx.master.index.IndexRegistryEntry
org.snmp4j.agent.agentx.subagent.index.SubAgentXIndexRegistryEntry
All Implemented Interfaces:
Comparable<IndexRegistryEntry>

public class SubAgentXIndexRegistryEntry extends IndexRegistryEntry
The SubAgentXIndexRegistryEntry is a sub-agent specific IndexRegistryEntry that creates SubAgentXIndexEntry instances to track index allocations on the sub-agent side.
  • Constructor Details

    • SubAgentXIndexRegistryEntry

      public SubAgentXIndexRegistryEntry(org.snmp4j.smi.OctetString context, org.snmp4j.smi.VariableBinding indexType)
      Creates a new SubAgentXIndexRegistryEntry for the given context and index type.
      Parameters:
      context - the SNMPv3 context.
      indexType - the index type.
  • Method Details

    • newIndexEntry

      protected IndexEntry newIndexEntry(int sessionID, org.snmp4j.smi.Variable indexValue)
      Description copied from class: IndexRegistryEntry
      Creates a new IndexEntry for the given session and index value. Subclasses may override this factory method to provide a specialized index entry implementation.
      Overrides:
      newIndexEntry in class IndexRegistryEntry
      Parameters:
      sessionID - the ID of the session allocating the index.
      indexValue - the index value of the index instance.
      Returns:
      a new IndexEntry.
    • duplicateAllocation

      protected void duplicateAllocation(IndexEntry entry)
      Description copied from class: IndexRegistryEntry
      Called 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:
      duplicateAllocation in class IndexRegistryEntry
      Parameters:
      entry - the index entry that has been allocated more than once.
    • addUsed

      protected void addUsed(IndexEntry entry)
      Description copied from class: IndexRegistryEntry
      Add a used index value to the used registry.
      Overrides:
      addUsed in class IndexRegistryEntry
      Parameters:
      entry - the index value entry.
    • removeEntry

      protected boolean removeEntry(IndexEntry entryKey)
      Description copied from class: IndexRegistryEntry
      Remove an index value from the active index values.
      Overrides:
      removeEntry in class IndexRegistryEntry
      Parameters:
      entryKey - the index value entry.
      Returns:
      true if the removal was successful.