public class SnmpRequest extends AbstractRequest<SnmpRequest.SnmpSubRequest,org.snmp4j.CommandResponderEvent,org.snmp4j.PDU>
SnmpRequest
class implements requests from a SNMP source.Modifier and Type | Class and Description |
---|---|
class |
SnmpRequest.SnmpSubRequest |
class |
SnmpRequest.SnmpSubRequestIterator |
Modifier and Type | Field and Description |
---|---|
static org.snmp4j.smi.OctetString |
DEFAULT_CONTEXT |
protected Map |
processingUserObjects |
errorStatus, phase, repeaterRowSize, repeaterStartIndex, reprocessCounter, response, source, subrequests, transactionID
PHASE_1PC, PHASE_2PC_CLEANUP, PHASE_2PC_COMMIT, PHASE_2PC_PREPARE, PHASE_2PC_UNDO, PHASE_INIT
Constructor and Description |
---|
SnmpRequest(org.snmp4j.CommandResponderEvent request,
CoexistenceInfo cinfo) |
Modifier and Type | Method and Description |
---|---|
protected void |
addRepeaterSubRequest() |
protected void |
assignErrorStatus2Response() |
CoexistenceInfo |
getCoexistenceInfo() |
int |
getCompleteRepetitions()
Returns the number of repetitions that are complete.
|
org.snmp4j.smi.OctetString |
getContext()
Gets the context of the request.
|
int |
getErrorIndex() |
org.snmp4j.CommandResponderEvent |
getInitiatingEvent()
Deprecated.
Use
AbstractRequest.getSource() instead. |
protected int |
getMaxPhase() |
int |
getMaxRepetitions() |
int |
getMessageProcessingModel() |
int |
getNonRepeaters() |
Object |
getProcessingUserObject(Object key)
Gets the processing user object for the specified key.
|
int |
getRepeaterCount() |
org.snmp4j.PDU |
getResponse()
Returns the response object for this request.
|
org.snmp4j.PDU |
getResponsePDU()
Deprecated.
Use #getResponse() instead.
|
int |
getSecurityLevel() |
int |
getSecurityModel() |
org.snmp4j.smi.OctetString |
getSecurityName() |
int |
getTransactionID() |
org.snmp4j.smi.OctetString |
getViewName() |
int |
getViewType() |
static int |
getViewType(int pduType)
Returns the VACM view type for the supplied PDU type.
|
protected boolean |
is2PC() |
boolean |
isBulkRequest() |
boolean |
isPhaseComplete()
Checks whether the current phase is complete.
|
Iterator<SnmpRequest.SnmpSubRequest> |
iterator()
iterator
|
static int |
nextTransactionID() |
Object |
setProcessingUserObject(Object key,
Object value)
Sets an user object association.
|
void |
setRequestEvent(org.snmp4j.CommandResponderEvent source) |
protected void |
setupSubRequests() |
void |
setViewName(org.snmp4j.smi.OctetString viewName) |
int |
size()
Gets the number of sub-requests in this request.
|
equals, find, get, getErrorStatus, getPhase, getReprocessCounter, getSource, hashCode, incReprocessCounter, initSubRequests, isComplete, nextPhase, resetCompletionStatus, resetProcessedStatus, setErrorStatus, setPhase, toString
public static final org.snmp4j.smi.OctetString DEFAULT_CONTEXT
protected Map processingUserObjects
public SnmpRequest(org.snmp4j.CommandResponderEvent request, CoexistenceInfo cinfo)
public static int nextTransactionID()
protected void setupSubRequests()
setupSubRequests
in class AbstractRequest<SnmpRequest.SnmpSubRequest,org.snmp4j.CommandResponderEvent,org.snmp4j.PDU>
public int getCompleteRepetitions()
r
for which all
i<r*(pduSize-nonRepeaters)
SubRequest
s
returned by AbstractRequest.get(int i)
return true on
SubRequest.isComplete()
.public int getMaxRepetitions()
public int getNonRepeaters()
protected int getMaxPhase()
getMaxPhase
in class AbstractRequest<SnmpRequest.SnmpSubRequest,org.snmp4j.CommandResponderEvent,org.snmp4j.PDU>
public int size()
Request
public org.snmp4j.CommandResponderEvent getInitiatingEvent()
AbstractRequest.getSource()
instead.AbstractRequest.getSource()
public void setRequestEvent(org.snmp4j.CommandResponderEvent source)
protected void assignErrorStatus2Response()
public org.snmp4j.PDU getResponsePDU()
getResponse()
public org.snmp4j.PDU getResponse()
Request
getResponse
in interface Request<org.snmp4j.CommandResponderEvent,org.snmp4j.PDU,SnmpRequest.SnmpSubRequest>
getResponse
in class AbstractRequest<SnmpRequest.SnmpSubRequest,org.snmp4j.CommandResponderEvent,org.snmp4j.PDU>
public Iterator<SnmpRequest.SnmpSubRequest> iterator()
protected boolean is2PC()
public org.snmp4j.smi.OctetString getContext()
Request
OctetString
instance.public org.snmp4j.smi.OctetString getViewName()
public void setViewName(org.snmp4j.smi.OctetString viewName)
public int getSecurityLevel()
public int getSecurityModel()
public org.snmp4j.smi.OctetString getSecurityName()
public int getViewType()
public static int getViewType(int pduType)
pduType
- a PDU type.protected void addRepeaterSubRequest()
public int getErrorIndex()
getErrorIndex
in interface Request<org.snmp4j.CommandResponderEvent,org.snmp4j.PDU,SnmpRequest.SnmpSubRequest>
getErrorIndex
in class AbstractRequest<SnmpRequest.SnmpSubRequest,org.snmp4j.CommandResponderEvent,org.snmp4j.PDU>
public int getTransactionID()
getTransactionID
in interface Request<org.snmp4j.CommandResponderEvent,org.snmp4j.PDU,SnmpRequest.SnmpSubRequest>
getTransactionID
in class AbstractRequest<SnmpRequest.SnmpSubRequest,org.snmp4j.CommandResponderEvent,org.snmp4j.PDU>
public CoexistenceInfo getCoexistenceInfo()
public int getMessageProcessingModel()
public int getRepeaterCount()
public boolean isPhaseComplete()
Request
true
if all required processing has been finished for
the current request phase. For single phase request types this method
returns the same result as Request.isComplete()
.public boolean isBulkRequest()
isBulkRequest
in class AbstractRequest<SnmpRequest.SnmpSubRequest,org.snmp4j.CommandResponderEvent,org.snmp4j.PDU>
public Object getProcessingUserObject(Object key)
Request
ManagedObject
s may put their own objects into the request
(for example to avoid unnecessary updates on behalf of the same request).key
- an Object.null
if their exists no such
association.public Object setProcessingUserObject(Object key, Object value)
Request
key
- a key Object.value
- a value Object associated with key
.key
or null
if no such association existed.Copyright © 2018 SNMP4J.org. All rights reserved.