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 Summary
ConstructorsModifierConstructorDescriptionprotectedAgentXSubRequest(AgentXRequest.AgentXSubRequest predecessor, int index) Creates a repeater sub-request that continues the processing of the given predecessor sub-request.protectedAgentXSubRequest(org.snmp4j.agent.MOScope searchRange, int index) Creates a sub-request for the given search range (used for GET, GETNEXT and GETBULK requests).protectedAgentXSubRequest(org.snmp4j.smi.VariableBinding subrequest, int index) Creates a sub-request for the given variable binding (used for SET and exact GET requests). -
Method Summary
Modifier and TypeMethodDescriptionvoidfinal intintgetIndex()org.snmp4j.agent.MOServerLookupEventReturns theMOServerLookupEventassociated with this sub-request, describing the managed object lookup performed for it.org.snmp4j.agent.MOQuerygetQuery()org.snmp4j.agent.request.Request<?, ?, ?> org.snmp4j.agent.MOScopegetScope()org.snmp4j.agent.request.RequestStatusorg.snmp4j.agent.ManagedObject<? super AgentXRequest.AgentXSubRequest> org.snmp4j.smi.VariableBindingbooleanhasError()booleanorg.snmp4j.agent.request.SubRequestIterator<AgentXRequest.AgentXSubRequest> voidrequestStatusChanged(org.snmp4j.agent.request.RequestStatusEvent event) final voidsetErrorStatus(int errorStatus) voidsetLookupEvent(org.snmp4j.agent.MOServerLookupEvent lookupEvent) Sets theMOServerLookupEventassociated with this sub-request.voidsetQuery(org.snmp4j.agent.MOQuery query) voidsetStatus(org.snmp4j.agent.request.RequestStatus status) Sets the request status object that tracks the processing state and error status of this sub-request.voidsetTargetMO(org.snmp4j.agent.ManagedObject<? super AgentXRequest.AgentXSubRequest> managedObject) voidsetUndoValue(Object undoInformation) voidsetUserObject(Object userObject) toString()void
-
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- theMOScopethat 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- theVariableBindingto be processed by this sub-request.index- the zero-based position of this sub-request within its request.
-
AgentXSubRequest
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:
getRequestin interfaceorg.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
-
getStatus
public org.snmp4j.agent.request.RequestStatus getStatus()- Specified by:
getStatusin interfaceorg.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
-
getVariableBinding
public org.snmp4j.smi.VariableBinding getVariableBinding()- Specified by:
getVariableBindingin interfaceorg.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 newRequestStatusfor this sub-request.
-
getUndoValue
- Specified by:
getUndoValuein interfaceorg.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
-
setUndoValue
- Specified by:
setUndoValuein interfaceorg.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
-
requestStatusChanged
public void requestStatusChanged(org.snmp4j.agent.request.RequestStatusEvent event) - Specified by:
requestStatusChangedin interfaceorg.snmp4j.agent.request.RequestStatusListener
-
getScope
public org.snmp4j.agent.MOScope getScope()- Specified by:
getScopein interfaceorg.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
-
completed
public void completed()- Specified by:
completedin interfaceorg.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
-
hasError
public boolean hasError()- Specified by:
hasErrorin interfaceorg.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
-
isComplete
public boolean isComplete()- Specified by:
isCompletein interfaceorg.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
-
setTargetMO
public void setTargetMO(org.snmp4j.agent.ManagedObject<? super AgentXRequest.AgentXSubRequest> managedObject) - Specified by:
setTargetMOin interfaceorg.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
-
getTargetMO
- Specified by:
getTargetMOin interfaceorg.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
-
getIndex
public int getIndex()- Specified by:
getIndexin interfaceorg.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
-
setQuery
public void setQuery(org.snmp4j.agent.MOQuery query) - Specified by:
setQueryin interfaceorg.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
-
getQuery
public org.snmp4j.agent.MOQuery getQuery()- Specified by:
getQueryin interfaceorg.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
-
toString
-
repetitions
- Specified by:
repetitionsin interfaceorg.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
-
updateNextRepetition
public void updateNextRepetition()- Specified by:
updateNextRepetitionin interfaceorg.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
-
setErrorStatus
public final void setErrorStatus(int errorStatus) - Specified by:
setErrorStatusin interfaceorg.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
-
getErrorStatus
public final int getErrorStatus()- Specified by:
getErrorStatusin interfaceorg.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
-
getUserObject
- Specified by:
getUserObjectin interfaceorg.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
-
setUserObject
- Specified by:
setUserObjectin interfaceorg.snmp4j.agent.request.SubRequest<AgentXRequest.AgentXSubRequest>
-
getLookupEvent
public org.snmp4j.agent.MOServerLookupEvent getLookupEvent()Returns theMOServerLookupEventassociated with this sub-request, describing the managed object lookup performed for it.- Returns:
- the lookup event, or
nullif no lookup event has been set.
-
setLookupEvent
public void setLookupEvent(org.snmp4j.agent.MOServerLookupEvent lookupEvent) Sets theMOServerLookupEventassociated with this sub-request.- Parameters:
lookupEvent- the lookup event describing the managed object lookup performed for this sub-request.
-