org.snmp4j.agent.agentx
Class AgentXContextPDU

java.lang.Object
  extended by org.snmp4j.agent.agentx.AgentXPDU
      extended by org.snmp4j.agent.agentx.AgentXContextPDU
Direct Known Subclasses:
AgentXAddAgentCapsPDU, AgentXPingPDU, AgentXRegisterPDU, AgentXRemoveAgentCapsPDU, AgentXRequestPDU, AgentXVariableBindingPDU

public abstract class AgentXContextPDU
extends AgentXPDU


Field Summary
protected  org.snmp4j.smi.OctetString context
           
 
Fields inherited from class org.snmp4j.agent.agentx.AgentXPDU
AGENTX_ADDAGENTCAPS_PDU, AGENTX_CLEANUPSET_PDU, AGENTX_CLOSE_PDU, AGENTX_COMMITSET_PDU, AGENTX_GET_PDU, AGENTX_GETBULK_PDU, AGENTX_GETNEXT_PDU, AGENTX_INDEXALLOCATE_PDU, AGENTX_INDEXDEALLOCATE_PDU, AGENTX_NOTIFY_PDU, AGENTX_OPEN_PDU, AGENTX_PING_PDU, AGENTX_REGISTER_PDU, AGENTX_REMOVEAGENTCAPS_PDU, AGENTX_RESPONSE_PDU, AGENTX_TESTSET_PDU, AGENTX_UNDOSET_PDU, AGENTX_UNREGISTER_PDU, byteOrder, flags, packetID, RESERVED, sessionID, transactionID, type, version
 
Constructor Summary
protected AgentXContextPDU(AgentXMessageHeader header)
           
protected AgentXContextPDU(byte type, byte flags, int sessionID, int transactionID, int packetID)
           
protected AgentXContextPDU(byte type, org.snmp4j.smi.OctetString context)
           
 
Method Summary
protected  void beforeEncode()
          Initialize flags and other things before a PDU is encoded.
protected abstract  void decodeAfterContext(java.nio.ByteBuffer buf, int length)
           
 void decodePayload(java.nio.ByteBuffer buf, int length)
           
protected abstract  void encodeAfterContext(java.nio.ByteBuffer buf)
           
 void encodePayload(java.nio.ByteBuffer buf)
           
protected abstract  int getAfterContextLength()
           
 org.snmp4j.smi.OctetString getContext()
           
 int getPayloadLength()
           
 void setContext(org.snmp4j.smi.OctetString context)
           
protected  java.lang.String toStringExtMembers()
           
 
Methods inherited from class org.snmp4j.agent.agentx.AgentXPDU
addFlag, decode, encode, getByteOrder, getFlags, getPacketID, getSessionID, getTransactionID, getType, getVersion, isConfirmedPDU, isFlagSet, main, setByteOrder, setFlags, setPacketID, setSessionAttributes, setSessionID, setTransactionID, setType, setVersion, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

context

protected org.snmp4j.smi.OctetString context
Constructor Detail

AgentXContextPDU

protected AgentXContextPDU(byte type,
                           org.snmp4j.smi.OctetString context)

AgentXContextPDU

protected AgentXContextPDU(AgentXMessageHeader header)

AgentXContextPDU

protected AgentXContextPDU(byte type,
                           byte flags,
                           int sessionID,
                           int transactionID,
                           int packetID)
Method Detail

decodeAfterContext

protected abstract void decodeAfterContext(java.nio.ByteBuffer buf,
                                           int length)
                                    throws java.io.IOException
Throws:
java.io.IOException

encodeAfterContext

protected abstract void encodeAfterContext(java.nio.ByteBuffer buf)

getAfterContextLength

protected abstract int getAfterContextLength()

decodePayload

public final void decodePayload(java.nio.ByteBuffer buf,
                                int length)
                         throws java.io.IOException
Specified by:
decodePayload in class AgentXPDU
Throws:
java.io.IOException

encodePayload

public final void encodePayload(java.nio.ByteBuffer buf)
Specified by:
encodePayload in class AgentXPDU

getPayloadLength

public final int getPayloadLength()
Specified by:
getPayloadLength in class AgentXPDU

getContext

public org.snmp4j.smi.OctetString getContext()

setContext

public void setContext(org.snmp4j.smi.OctetString context)

toStringExtMembers

protected java.lang.String toStringExtMembers()
Overrides:
toStringExtMembers in class AgentXPDU

beforeEncode

protected void beforeEncode()
Initialize flags and other things before a PDU is encoded.

Specified by:
beforeEncode in class AgentXPDU

Copyright 2005-2011 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.