Class AgentXRequest.AgentXSubRequest

java.lang.Object
org.snmp4j.agent.agentx.subagent.AgentXRequest.AgentXSubRequest
All Implemented Interfaces:
EventListener, org.snmp4j.agent.request.RequestStatusListener, org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
Enclosing class:
AgentXRequest

public class AgentXRequest.AgentXSubRequest extends Object implements org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>, org.snmp4j.agent.request.RequestStatusListener
The AgentXSubRequest implements the SubRequest interface for AgentX sub-requests.
Version:
1.0
Author:
Frank Fock
  • Constructor Details

    • AgentXSubRequest

      protected AgentXSubRequest(org.snmp4j.agent.MOScope searchRange, int index)
      Creates a sub-request for the given search range (used for GET, GETNEXT and GETBULK requests). The variable binding is initialized with the lower bound OID of the supplied scope.
      Parameters:
      searchRange - the MOScope that defines the search range of this sub-request.
      index - the zero-based position of this sub-request within its request.
    • AgentXSubRequest

      protected AgentXSubRequest(org.snmp4j.smi.VariableBinding subrequest, int index)
      Creates a sub-request for the given variable binding (used for SET and exact GET requests). The scope is initialized to match exactly the OID of the supplied variable binding within the request's context.
      Parameters:
      subrequest - the VariableBinding to be processed by this sub-request.
      index - the zero-based position of this sub-request within its request.
    • AgentXSubRequest

      protected AgentXSubRequest(AgentXRequest.AgentXSubRequest predecessor, int index)
      Creates a repeater sub-request that continues the processing of the given predecessor sub-request. For GETNEXT and GETBULK commands the scope starts after the predecessor's current OID; for other command types the predecessor's scope is reused.
      Parameters:
      predecessor - the sub-request whose repetition is continued by this sub-request.
      index - the zero-based position of this sub-request within its request.
  • Method Details

    • getRequest

      public org.snmp4j.agent.request.Request<?,?,?> getRequest()
      Specified by:
      getRequest in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • getStatus

      public org.snmp4j.agent.request.RequestStatus getStatus()
      Specified by:
      getStatus in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • getVariableBinding

      public org.snmp4j.smi.VariableBinding getVariableBinding()
      Specified by:
      getVariableBinding in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • setStatus

      public void setStatus(org.snmp4j.agent.request.RequestStatus status)
      Sets the request status object that tracks the processing state and error status of this sub-request.
      Parameters:
      status - the new RequestStatus for this sub-request.
    • getUndoValue

      public Object getUndoValue()
      Specified by:
      getUndoValue in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • setUndoValue

      public void setUndoValue(Object undoInformation)
      Specified by:
      setUndoValue in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • requestStatusChanged

      public void requestStatusChanged(org.snmp4j.agent.request.RequestStatusEvent event)
      Specified by:
      requestStatusChanged in interface org.snmp4j.agent.request.RequestStatusListener
    • getScope

      public org.snmp4j.agent.MOScope getScope()
      Specified by:
      getScope in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • completed

      public void completed()
      Specified by:
      completed in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • hasError

      public boolean hasError()
      Specified by:
      hasError in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • isComplete

      public boolean isComplete()
      Specified by:
      isComplete in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • setTargetMO

      public void setTargetMO(org.snmp4j.agent.ManagedObject<? super AgentXRequest.AgentXSubRequest> managedObject)
      Specified by:
      setTargetMO in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • getTargetMO

      public org.snmp4j.agent.ManagedObject<? super AgentXRequest.AgentXSubRequest> getTargetMO()
      Specified by:
      getTargetMO in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • getIndex

      public int getIndex()
      Specified by:
      getIndex in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • setQuery

      public void setQuery(org.snmp4j.agent.MOQuery query)
      Specified by:
      setQuery in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • getQuery

      public org.snmp4j.agent.MOQuery getQuery()
      Specified by:
      getQuery in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • repetitions

      public org.snmp4j.agent.request.SubRequestIterator<AgentXRequest.AgentXSubRequest> repetitions()
      Specified by:
      repetitions in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • updateNextRepetition

      public void updateNextRepetition()
      Specified by:
      updateNextRepetition in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • setErrorStatus

      public final void setErrorStatus(int errorStatus)
      Specified by:
      setErrorStatus in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • getErrorStatus

      public final int getErrorStatus()
      Specified by:
      getErrorStatus in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • getUserObject

      public Object getUserObject()
      Specified by:
      getUserObject in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • setUserObject

      public void setUserObject(Object userObject)
      Specified by:
      setUserObject in interface org.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
    • getLookupEvent

      public org.snmp4j.agent.MOServerLookupEvent getLookupEvent()
      Returns the MOServerLookupEvent associated with this sub-request, describing the managed object lookup performed for it.
      Returns:
      the lookup event, or null if no lookup event has been set.
    • setLookupEvent

      public void setLookupEvent(org.snmp4j.agent.MOServerLookupEvent lookupEvent)
      Sets the MOServerLookupEvent associated with this sub-request.
      Parameters:
      lookupEvent - the lookup event describing the managed object lookup performed for this sub-request.