public class SnmpRequest.SnmpSubRequest extends Object implements SnmpSubRequest, RequestStatusListener
| Modifier | Constructor and Description | 
|---|---|
protected  | 
SnmpRequest.SnmpSubRequest(SnmpRequest.SnmpSubRequest predecessor,
                          int index)  | 
protected  | 
SnmpRequest.SnmpSubRequest(org.snmp4j.smi.VariableBinding subrequest,
                          int index)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
completed()
Marks the sub-request as completed. 
 | 
int | 
getErrorStatus()
Gets the error status for this sub-request. 
 | 
int | 
getIndex()
Returns the index of this subrequest in the request. 
 | 
protected MOScope | 
getNextScope(org.snmp4j.smi.OID previousOID)  | 
MOQuery | 
getQuery()
Gets the query previously associated with this sub-request. 
 | 
SnmpRequest | 
getRequest()
Gets the request this sub-request belongs to. 
 | 
MOScope | 
getScope()
Gets the scope for this subrequest. 
 | 
SnmpRequest | 
getSnmpRequest()  | 
RequestStatus | 
getStatus()
Gets the status object associated with this sub-request. 
 | 
ManagedObject | 
getTargetMO()
Gets the  
ManagedObject that is responsible for processing
 this sub-request. | 
Object | 
getUndoValue()
Gets the undo value object associated with this sub-request. 
 | 
Object | 
getUserObject()
Gets the user object that has previously associated with this sub-request. 
 | 
org.snmp4j.smi.VariableBinding | 
getVariableBinding()
Returns the variable binding associated with the sub-request. 
 | 
boolean | 
hasError()
Indicates whether this (sub-)request has an error. 
 | 
boolean | 
isComplete()
Checks whether the sub-request has been completed and needs no further
 processing. 
 | 
SubRequestIterator<? extends SubRequest> | 
repetitions()
Returns an iterator on the repetitions of this sub-request. 
 | 
void | 
requestStatusChanged(RequestStatusEvent event)  | 
void | 
setErrorStatus(int errorStatus)
Sets the error status for this sub-request. 
 | 
void | 
setQuery(MOQuery query)
Sets the query associated with this subrequest. 
 | 
void | 
setStatus(RequestStatus status)  | 
void | 
setTargetMO(ManagedObject managedObject)
Sets the  
ManagedObject that is determined as the target object
 of this sub-request by the agent framework. | 
void | 
setUndoValue(Object undoInformation)
Associates an undo value object with this sub-request. 
 | 
void | 
setUserObject(Object userObject)
Sets the user object. 
 | 
String | 
toString()  | 
void | 
updateNextRepetition()
Updates the next repetition's scope and reset any previously set query
 to  
null. | 
protected SnmpRequest.SnmpSubRequest(org.snmp4j.smi.VariableBinding subrequest,
                          int index)
protected SnmpRequest.SnmpSubRequest(SnmpRequest.SnmpSubRequest predecessor, int index)
protected MOScope getNextScope(org.snmp4j.smi.OID previousOID)
public SnmpRequest getRequest()
SubRequestgetRequest in interface SubRequestpublic RequestStatus getStatus()
SubRequestgetStatus in interface SnmpSubRequestgetStatus in interface SubRequestpublic org.snmp4j.smi.VariableBinding getVariableBinding()
SubRequestgetVariableBinding in interface SnmpSubRequestgetVariableBinding in interface SubRequestVariableBinding that holds the sub-request result
    or operation parameter (in case of a SET request).public void setStatus(RequestStatus status)
setStatus in interface SnmpSubRequestpublic Object getUndoValue()
SubRequestgetUndoValue in interface SubRequestSubRequest.setUndoValue(java.lang.Object).public void setUndoValue(Object undoInformation)
SubRequestManagedObject interface that does not extend any other
 API class.setUndoValue in interface SubRequestundoInformation - an object that represents/contains all necessary information to undo
    this sub-request.public void requestStatusChanged(RequestStatusEvent event)
requestStatusChanged in interface RequestStatusListenerpublic MOScope getScope()
SubRequestgetScope in interface SubRequestMOScope instance.public void completed()
SubRequestSubRequest.getStatus() and then
 RequestStatus.setPhaseComplete(boolean) to true.completed in interface SubRequestpublic boolean hasError()
SubRequesthasError in interface SubRequesttrue if this request (and thus also this sub-request) has
    an error status greater than zero.public boolean isComplete()
SubRequestisComplete in interface SubRequesttrue if the sub-request has been finished and should not
    be processed any more.public void setTargetMO(ManagedObject managedObject)
SubRequestManagedObject that is determined as the target object
 of this sub-request by the agent framework. For SET requests the target
 managed object is locked and referenced here to make sure that all locks
 are released when a request is answered. In addition, SET requests are
 processed in multiple phases and referencing the target managed objects
 increases performance.setTargetMO in interface SubRequestmanagedObject - the ManagedObject responsible for processing this sub-
    request.public ManagedObject getTargetMO()
SubRequestManagedObject that is responsible for processing
 this sub-request.getTargetMO in interface SubRequestManagedObject instance.public SnmpRequest getSnmpRequest()
getSnmpRequest in interface SnmpSubRequestpublic void setErrorStatus(int errorStatus)
SubRequestSubRequest.getStatus().setErrorStatus(int errorStatus)
 .setErrorStatus in interface SnmpSubRequestsetErrorStatus in interface SubRequesterrorStatus - a SNMPv2/v3 error status.public int getIndex()
SubRequestgetIndex in interface SubRequestpublic void setQuery(MOQuery query)
SubRequestsetQuery in interface SubRequestquery - a MOQuery instance representing the query resulting from
    this sub-request.public MOQuery getQuery()
SubRequestgetQuery in interface SubRequestMOQuery that describes which manage objects match
    this sub-request.public SubRequestIterator<? extends SubRequest> repetitions()
SubRequestrepetitions in interface SubRequestpublic void updateNextRepetition()
SubRequestnull. The scope of the next repetition is updated
 according to the value of this variable binding. If this sub-request
 has an error status or exception value, the following repetitions are
 set to the same value and exception. Otherwise, the scope of the following
 sub-request is the open interval from this sub-request's OID
 (not-including) to any OID value.updateNextRepetition in interface SubRequestpublic final int getErrorStatus()
SubRequestSubRequest.getStatus().getErrorStatus()
 .getErrorStatus in interface SubRequestpublic Object getUserObject()
SubRequestgetUserObject in interface SubRequestpublic void setUserObject(Object userObject)
SubRequestnull.setUserObject in interface SubRequestuserObject - an object that is not processed or interpreted by the agent API.Copyright © 2015 SNMP4J.org. All rights reserved.