org.snmp4j.agent.agentx
Class AgentXPDU

java.lang.Object
  extended by org.snmp4j.agent.agentx.AgentXPDU
Direct Known Subclasses:
AgentXCleanupSetPDU, AgentXClosePDU, AgentXCommitSetPDU, AgentXContextPDU, AgentXOpenPDU, AgentXResponsePDU, AgentXUndoSetPDU

public abstract class AgentXPDU
extends java.lang.Object


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

Field Detail

RESERVED

public static final byte RESERVED
See Also:
Constant Field Values

AGENTX_OPEN_PDU

public static final byte AGENTX_OPEN_PDU
See Also:
Constant Field Values

AGENTX_CLOSE_PDU

public static final byte AGENTX_CLOSE_PDU
See Also:
Constant Field Values

AGENTX_REGISTER_PDU

public static final byte AGENTX_REGISTER_PDU
See Also:
Constant Field Values

AGENTX_UNREGISTER_PDU

public static final byte AGENTX_UNREGISTER_PDU
See Also:
Constant Field Values

AGENTX_GET_PDU

public static final byte AGENTX_GET_PDU
See Also:
Constant Field Values

AGENTX_GETNEXT_PDU

public static final byte AGENTX_GETNEXT_PDU
See Also:
Constant Field Values

AGENTX_GETBULK_PDU

public static final byte AGENTX_GETBULK_PDU
See Also:
Constant Field Values

AGENTX_TESTSET_PDU

public static final byte AGENTX_TESTSET_PDU
See Also:
Constant Field Values

AGENTX_COMMITSET_PDU

public static final byte AGENTX_COMMITSET_PDU
See Also:
Constant Field Values

AGENTX_UNDOSET_PDU

public static final byte AGENTX_UNDOSET_PDU
See Also:
Constant Field Values

AGENTX_CLEANUPSET_PDU

public static final byte AGENTX_CLEANUPSET_PDU
See Also:
Constant Field Values

AGENTX_NOTIFY_PDU

public static final byte AGENTX_NOTIFY_PDU
See Also:
Constant Field Values

AGENTX_PING_PDU

public static final byte AGENTX_PING_PDU
See Also:
Constant Field Values

AGENTX_INDEXALLOCATE_PDU

public static final byte AGENTX_INDEXALLOCATE_PDU
See Also:
Constant Field Values

AGENTX_INDEXDEALLOCATE_PDU

public static final byte AGENTX_INDEXDEALLOCATE_PDU
See Also:
Constant Field Values

AGENTX_ADDAGENTCAPS_PDU

public static final byte AGENTX_ADDAGENTCAPS_PDU
See Also:
Constant Field Values

AGENTX_REMOVEAGENTCAPS_PDU

public static final byte AGENTX_REMOVEAGENTCAPS_PDU
See Also:
Constant Field Values

AGENTX_RESPONSE_PDU

public static final byte AGENTX_RESPONSE_PDU
See Also:
Constant Field Values

type

protected byte type

version

protected byte version

sessionID

protected int sessionID

transactionID

protected int transactionID

packetID

protected int packetID

flags

protected byte flags

byteOrder

protected java.nio.ByteOrder byteOrder
Constructor Detail

AgentXPDU

protected AgentXPDU(byte type)

AgentXPDU

protected AgentXPDU(byte type,
                    byte flags,
                    int sessionID,
                    int transactionID,
                    int packetID)

AgentXPDU

protected AgentXPDU(AgentXMessageHeader header)
Method Detail

addFlag

public final void addFlag(byte flag)

isFlagSet

public final boolean isFlagSet(int flag)

getFlags

public final byte getFlags()

getPacketID

public final int getPacketID()

getSessionID

public final int getSessionID()

getType

public final byte getType()

getVersion

public final byte getVersion()

getByteOrder

public final java.nio.ByteOrder getByteOrder()

getTransactionID

public final int getTransactionID()

setFlags

public void setFlags(byte flags)

setPacketID

public void setPacketID(int packetID)

setSessionID

public void setSessionID(int sessionID)

setType

public void setType(byte type)

setVersion

public void setVersion(byte version)

setByteOrder

public void setByteOrder(java.nio.ByteOrder byteOrder)

setTransactionID

public void setTransactionID(int transactionID)

setSessionAttributes

public void setSessionAttributes(AgentXSession session)

encodePayload

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

getPayloadLength

public abstract int getPayloadLength()

encode

public final void encode(java.nio.ByteBuffer buf)

beforeEncode

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


decodePayload

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

decode

public static AgentXPDU decode(java.nio.ByteBuffer buf)
                        throws java.io.IOException
Throws:
java.io.IOException

isConfirmedPDU

public final boolean isConfirmedPDU()

toStringExtMembers

protected java.lang.String toStringExtMembers()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

main

public static void main(java.lang.String[] args)

Copyright 2005-2011 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.