org.snmp4j.agent.agentx.subagent
Class AgentXRequest

java.lang.Object
  extended by org.snmp4j.agent.request.AbstractRequest<AgentXRequest.AgentXSubRequest,AgentXCommandEvent,AgentXResponsePDU>
      extended by org.snmp4j.agent.agentx.subagent.AgentXRequest
All Implemented Interfaces:
org.snmp4j.agent.request.Request<AgentXCommandEvent,AgentXResponsePDU>

public class AgentXRequest
extends org.snmp4j.agent.request.AbstractRequest<AgentXRequest.AgentXSubRequest,AgentXCommandEvent,AgentXResponsePDU>

The AgentXRequest class represents AgentX sub-agent requests. AgentX sub-agent requests are similar to SNMP requests but especially for SET request processing and query scopes differences apply.

Version:
1.0
Author:
Frank Fock

Nested Class Summary
 class AgentXRequest.AgentXSubRequest
          The AgentXSubRequest implements the SubRequest interface for AgentX sub-requests.
 class AgentXRequest.AgentXSubRequestIterator
          The AgentXSubRequestIterator iterates over the subrequests in a AgentX request.
 
Field Summary
static org.snmp4j.smi.OctetString DEFAULT_CONTEXT
           
protected  java.util.Map<java.lang.Object,java.lang.Object> 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
AgentXRequest(AgentXCommandEvent request)
           
 
Method Summary
protected  void addRepeaterSubRequest()
           
protected  void assignErrorStatus2Response()
           
 org.snmp4j.smi.OctetString getContext()
           
protected  int getMaxPhase()
           
 int getMaxRepetitions()
           
 int getMessageProcessingModel()
           
 int getNonRepeaters()
           
 java.lang.Object getProcessingUserObject(java.lang.Object key)
           
 AgentXResponsePDU getResponse()
           
 AgentXResponsePDU getResponsePDU()
           
 int getSecurityLevel()
           
 int getSecurityModel()
           
 org.snmp4j.smi.OctetString getSecurityName()
           
 org.snmp4j.smi.OctetString getViewName()
           
 int getViewType()
           
protected  boolean is2PC()
           
 boolean isBulkRequest()
           
 boolean isPhaseComplete()
           
 java.util.Iterator<org.snmp4j.agent.request.SubRequest> iterator()
           
static int nextTransactionID()
           
 java.lang.Object setProcessingUserObject(java.lang.Object key, java.lang.Object value)
           
 void setRequestEvent(AgentXCommandEvent source)
           
protected  void setupSubRequests()
           
 void setViewName(org.snmp4j.smi.OctetString viewName)
           
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class org.snmp4j.agent.request.AbstractRequest
equals, find, get, getErrorIndex, getErrorStatus, getPhase, getReprocessCounter, getSource, getTransactionID, hashCode, incReprocessCounter, initSubRequests, isComplete, nextPhase, resetCompletionStatus, resetProcessedStatus, setErrorStatus, setPhase
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_CONTEXT

public static final org.snmp4j.smi.OctetString DEFAULT_CONTEXT

processingUserObjects

protected java.util.Map<java.lang.Object,java.lang.Object> processingUserObjects
Constructor Detail

AgentXRequest

public AgentXRequest(AgentXCommandEvent request)
Method Detail

nextTransactionID

public static int nextTransactionID()

size

public int size()

isBulkRequest

public boolean isBulkRequest()
Specified by:
isBulkRequest in class org.snmp4j.agent.request.AbstractRequest<AgentXRequest.AgentXSubRequest,AgentXCommandEvent,AgentXResponsePDU>

setupSubRequests

protected void setupSubRequests()
Specified by:
setupSubRequests in class org.snmp4j.agent.request.AbstractRequest<AgentXRequest.AgentXSubRequest,AgentXCommandEvent,AgentXResponsePDU>

getMaxRepetitions

public int getMaxRepetitions()

getNonRepeaters

public int getNonRepeaters()

getMaxPhase

protected int getMaxPhase()
Specified by:
getMaxPhase in class org.snmp4j.agent.request.AbstractRequest<AgentXRequest.AgentXSubRequest,AgentXCommandEvent,AgentXResponsePDU>

setRequestEvent

public void setRequestEvent(AgentXCommandEvent source)

assignErrorStatus2Response

protected void assignErrorStatus2Response()

getResponsePDU

public AgentXResponsePDU getResponsePDU()

getResponse

public AgentXResponsePDU getResponse()
Specified by:
getResponse in interface org.snmp4j.agent.request.Request<AgentXCommandEvent,AgentXResponsePDU>
Overrides:
getResponse in class org.snmp4j.agent.request.AbstractRequest<AgentXRequest.AgentXSubRequest,AgentXCommandEvent,AgentXResponsePDU>

iterator

public java.util.Iterator<org.snmp4j.agent.request.SubRequest> iterator()

is2PC

protected boolean is2PC()

getContext

public org.snmp4j.smi.OctetString getContext()

getViewName

public org.snmp4j.smi.OctetString getViewName()

setViewName

public void setViewName(org.snmp4j.smi.OctetString viewName)

getSecurityLevel

public int getSecurityLevel()

getSecurityModel

public int getSecurityModel()

getSecurityName

public org.snmp4j.smi.OctetString getSecurityName()

getViewType

public int getViewType()

addRepeaterSubRequest

protected void addRepeaterSubRequest()

getMessageProcessingModel

public int getMessageProcessingModel()

toString

public java.lang.String toString()
Overrides:
toString in class org.snmp4j.agent.request.AbstractRequest<AgentXRequest.AgentXSubRequest,AgentXCommandEvent,AgentXResponsePDU>

isPhaseComplete

public boolean isPhaseComplete()

getProcessingUserObject

public java.lang.Object getProcessingUserObject(java.lang.Object key)

setProcessingUserObject

public java.lang.Object setProcessingUserObject(java.lang.Object key,
                                                java.lang.Object value)

Copyright 2005-2011 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.