Package org.snmp4j.agent.agentx
Class AgentXAddAgentCapsPDU
java.lang.Object
org.snmp4j.agent.agentx.AgentXPDU
org.snmp4j.agent.agentx.AgentXContextPDU
org.snmp4j.agent.agentx.AgentXAddAgentCapsPDU
- All Implemented Interfaces:
Serializable
The
AgentXAddAgentCapsPDU represents an agentx-AddAgentCaps-PDU from RFC 2741.- Author:
- Frank Fock
- See Also:
-
Field Summary
Fields inherited from class org.snmp4j.agent.agentx.AgentXContextPDU
contextFields 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
ConstructorsConstructorDescriptionCreates aAgentXAddAgentCapsPDUfrom aAgentXMessageHeader.AgentXAddAgentCapsPDU(org.snmp4j.smi.OctetString context, org.snmp4j.smi.OID id, org.snmp4j.smi.OctetString descr) Creates aAgentXAddAgentCapsPDUfrom context, oid, and description. -
Method Summary
Modifier and TypeMethodDescriptionvoiddecodeAfterContext(ByteBuffer buf, int length) Decode this PDU after the end of the encoded context.voidEncode this PDU after already encoded context (thus context will not be encoded by this operation).intGets the encoded length after an already encoded context.org.snmp4j.smi.OctetStringgetDescr()Gets the description.org.snmp4j.smi.OIDgetId()Gets the ID.voidsetDescr(org.snmp4j.smi.OctetString descr) Sets the description.voidsetId(org.snmp4j.smi.OID id) Sets the ID.Methods inherited from class org.snmp4j.agent.agentx.AgentXContextPDU
beforeEncode, decodePayload, encodePayload, getContext, getPayloadLength, setContext, toStringExtMembersMethods inherited from class org.snmp4j.agent.agentx.AgentXPDU
addFlag, decode, encode, getByteOrder, getFlags, getPacketID, getSessionID, getTransactionID, getType, getVersion, isConfirmedPDU, isFlagSet, setByteOrder, setFlags, setPacketID, setSessionAttributes, setSessionID, setTransactionID, setType, setVersion, toString
-
Constructor Details
-
AgentXAddAgentCapsPDU
Creates aAgentXAddAgentCapsPDUfrom aAgentXMessageHeader.- Parameters:
header- the message header.
-
AgentXAddAgentCapsPDU
public AgentXAddAgentCapsPDU(org.snmp4j.smi.OctetString context, org.snmp4j.smi.OID id, org.snmp4j.smi.OctetString descr) Creates aAgentXAddAgentCapsPDUfrom context, oid, and description.- Parameters:
context- the context.id- the ID.descr- the description.
-
-
Method Details
-
decodeAfterContext
Decode this PDU after the end of the encoded context.- Specified by:
decodeAfterContextin classAgentXContextPDU- Parameters:
buf- the buffer positioned at the end of the encoded context.length- the length of the PDU to be decoded.- Throws:
IOException- if the buffer contains less data than expected.
-
encodeAfterContext
Encode this PDU after already encoded context (thus context will not be encoded by this operation).- Specified by:
encodeAfterContextin classAgentXContextPDU- Parameters:
buf- the target buffer.
-
getAfterContextLength
public int getAfterContextLength()Gets the encoded length after an already encoded context.- Specified by:
getAfterContextLengthin classAgentXContextPDU- Returns:
- the BER encoded length of ID and description.
-
getDescr
public org.snmp4j.smi.OctetString getDescr()Gets the description.- Returns:
- an
OctetString.
-
getId
public org.snmp4j.smi.OID getId()Gets the ID.- Returns:
- an
OID.
-
setDescr
public void setDescr(org.snmp4j.smi.OctetString descr) Sets the description.- Parameters:
descr- anOctetString.
-
setId
public void setId(org.snmp4j.smi.OID id) Sets the ID.- Parameters:
id- aOID.
-