public interface SubRequest
SubRequest
interface defines general sub-request
properties and behavior.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.
|
MOQuery |
getQuery()
Gets the query previously associated with this sub-request.
|
Request |
getRequest()
Gets the request this sub-request belongs to.
|
MOScope |
getScope()
Gets the scope for this subrequest.
|
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 |
setErrorStatus(int errorStatus)
Sets the error status for this sub-request.
|
void |
setQuery(MOQuery query)
Sets the query associated with this subrequest.
|
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.
|
void |
updateNextRepetition()
Updates the next repetition's scope and reset any previously set query
to
null . |
boolean hasError()
true
if this request (and thus also this sub-request) has
an error status greater than zero.void setErrorStatus(int errorStatus)
getStatus()
.setErrorStatus(int errorStatus)
.errorStatus
- a SNMPv2/v3 error status.int getErrorStatus()
getStatus()
.getErrorStatus()
.RequestStatus getStatus()
MOScope getScope()
MOScope
instance.org.snmp4j.smi.VariableBinding getVariableBinding()
VariableBinding
that holds the sub-request result
or operation parameter (in case of a SET request).Request getRequest()
Object getUndoValue()
setUndoValue(java.lang.Object)
.void setUndoValue(Object undoInformation)
ManagedObject
interface that does not extend any other
API class.undoInformation
- an object that represents/contains all necessary information to undo
this sub-request.void completed()
getStatus()
and then
RequestStatus.setPhaseComplete(boolean)
to true
.boolean isComplete()
true
if the sub-request has been finished and should not
be processed any more.void setTargetMO(ManagedObject managedObject)
ManagedObject
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.managedObject
- the ManagedObject
responsible for processing this sub-
request.ManagedObject getTargetMO()
ManagedObject
that is responsible for processing
this sub-request.ManagedObject
instance.int getIndex()
void setQuery(MOQuery query)
query
- a MOQuery
instance representing the query resulting from
this sub-request.MOQuery getQuery()
MOQuery
that describes which manage objects match
this sub-request.SubRequestIterator<? extends SubRequest> repetitions()
void updateNextRepetition()
null
. 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.Object getUserObject()
void setUserObject(Object userObject)
null
.userObject
- an object that is not processed or interpreted by the agent API.Copyright © 2019 SNMP4J.org. All rights reserved.