|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.snmp4j.agent.request.AbstractRequest<SnmpRequest.SnmpSubRequest,org.snmp4j.CommandResponderEvent,org.snmp4j.PDU>
org.snmp4j.agent.request.SnmpRequest
public class SnmpRequest
The SnmpRequest class implements requests from a SNMP source.
| Nested Class Summary | |
|---|---|
class |
SnmpRequest.SnmpSubRequest
|
class |
SnmpRequest.SnmpSubRequestIterator
|
| Field Summary | |
|---|---|
static org.snmp4j.smi.OctetString |
DEFAULT_CONTEXT
|
protected java.util.Map |
processingUserObjects
|
| Fields inherited from class org.snmp4j.agent.request.AbstractRequest |
|---|
errorStatus, phase, repeaterRowSize, repeaterStartIndex, reprocessCounter, response, source, subrequests, transactionID |
| Fields inherited from interface org.snmp4j.agent.request.Request |
|---|
PHASE_1PC, PHASE_2PC_CLEANUP, PHASE_2PC_COMMIT, PHASE_2PC_PREPARE, PHASE_2PC_UNDO, PHASE_INIT |
| Constructor Summary | |
|---|---|
SnmpRequest(org.snmp4j.CommandResponderEvent request,
CoexistenceInfo cinfo)
|
|
| Method Summary | |
|---|---|
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()
|
java.lang.Object |
getProcessingUserObject(java.lang.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. |
java.util.Iterator<SubRequest> |
iterator()
iterator |
static int |
nextTransactionID()
|
java.lang.Object |
setProcessingUserObject(java.lang.Object key,
java.lang.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. |
| Methods inherited from class org.snmp4j.agent.request.AbstractRequest |
|---|
equals, find, get, getErrorStatus, getPhase, getReprocessCounter, getSource, hashCode, incReprocessCounter, initSubRequests, isComplete, nextPhase, resetCompletionStatus, resetProcessedStatus, setErrorStatus, setPhase, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final org.snmp4j.smi.OctetString DEFAULT_CONTEXT
protected java.util.Map processingUserObjects
| Constructor Detail |
|---|
public SnmpRequest(org.snmp4j.CommandResponderEvent request,
CoexistenceInfo cinfo)
| Method Detail |
|---|
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) SubRequests
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>getResponse in class AbstractRequest<SnmpRequest.SnmpSubRequest,org.snmp4j.CommandResponderEvent,org.snmp4j.PDU>public java.util.Iterator<SubRequest> 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>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>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 java.lang.Object getProcessingUserObject(java.lang.Object key)
RequestManagedObjects 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 java.lang.Object setProcessingUserObject(java.lang.Object key,
java.lang.Object value)
Request
key - a key Object.value - a value Object associated with key.
key or null
if no such association existed.
|
Copyright 2005-2010 Frank Fock (SNMP4J.org) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||