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

java.lang.Object
org.snmp4j.agent.agentx.master.AbstractAgentXPending<A>
org.snmp4j.agent.agentx.master.AgentXPendingGet<A>
Type Parameters:
A - the address type.
All Implemented Interfaces:
Serializable, AgentXPending<A>

public class AgentXPendingGet<A extends org.snmp4j.smi.Address> extends AbstractAgentXPending<A>
AgentXPendingGet implements an AgentX GET request.
See Also:
  • Constructor Details

    • AgentXPendingGet

      public AgentXPendingGet(AgentXRegEntry<A> registration, org.snmp4j.agent.request.SnmpRequest request, AgentXSearchRange searchRange)
      Creates a AgentXPendingGet request.
      Parameters:
      registration - the registration used processing the request.
      request - the request.
      searchRange - the current search range for the request.
    • AgentXPendingGet

      public AgentXPendingGet(AgentXRegEntry<A> registration, org.snmp4j.agent.request.SnmpRequest request, AgentXSearchRange searchRange, Function<org.snmp4j.smi.OID,Boolean> oidFilter)
      Creates a AgentXPendingGet request.
      Parameters:
      registration - the registration used processing the request.
      request - the request.
      searchRange - the current search range for the request.
      oidFilter - an optional filter to remove objects returned by an AgentX sub-agent from the result of GetNext or GetBulk operations. Typically, this can be VACM filtering. Only if the provided function is null or returns true, the retrieved OID will be returned to the command generator.
      Since:
      4.1.0
  • Method Details

    • addSearchRange

      public void addSearchRange(AgentXSearchRange searchRange)
      Adds a search range to the request.
      Parameters:
      searchRange - an additional search range.
    • setNonRepeater

      public void setNonRepeater(short nonRepeater)
      Sets the non-repeater count, i.e. marks the first n search ranges as non-repeating.
      Parameters:
      nonRepeater - number of non-repeater search ranges.
    • incNonRepeater

      public void incNonRepeater()
      Increments the number of non-repeaters in the request.
    • getAgentXPDU

      public AgentXPDU getAgentXPDU()
      Description copied from interface: AgentXPending
      Gets the AgentX PDU.
      Returns:
      the AgentXPDU.
    • getSearchRanges

      public Collection<AgentXSearchRange> getSearchRanges()
      Gets the search ranges of the GET type request.
      Returns:
      a Collection of search ranges.
    • getNonRepeater

      public short getNonRepeater()
      Gets the number of non-repeaters in the request.
      Returns:
      number of non-repeater.
    • getOidFilter

      public Function<org.snmp4j.smi.OID,Boolean> getOidFilter()
      Get the optional filter to remove objects returned by an AgentX sub-agent from the result of GetNext or GetBulk operations. Typically, this can be VACM filtering. Only if the provided function returns true, the retrieved OID will be returned to the command generator.
      Returns:
      the filter function.
      Since:
      4.1.0
    • getSession

      public AgentXMasterSession<A> getSession()
      Description copied from interface: AgentXPending
      Gets the master agent session.
      Returns:
      the AgentXMasterSession.
    • getReferences

      public org.snmp4j.agent.request.SubRequestIterator<org.snmp4j.agent.request.SnmpRequest.SnmpSubRequest> getReferences()
      Description copied from interface: AgentXPending
      Get the references to the SNMP sub-requests that triggered the AgentX request.
      Returns:
      an iterator on the SNMP requests associated with this AgentX pending request.
    • toString

      public String toString()
      Overrides:
      toString in class AbstractAgentXPending<A extends org.snmp4j.smi.Address>