Class AgentXAddAgentCapsPDU

All Implemented Interfaces:
Serializable

public class AgentXAddAgentCapsPDU extends AgentXContextPDU
The AgentXAddAgentCapsPDU represents an agentx-AddAgentCaps-PDU from RFC 2741.
Author:
Frank Fock
See Also:
  • Constructor Details

    • AgentXAddAgentCapsPDU

      public AgentXAddAgentCapsPDU(AgentXMessageHeader header)
      Parameters:
      header - the message header.
    • AgentXAddAgentCapsPDU

      public AgentXAddAgentCapsPDU(org.snmp4j.smi.OctetString context, org.snmp4j.smi.OID id, org.snmp4j.smi.OctetString descr)
      Creates a AgentXAddAgentCapsPDU from context, oid, and description.
      Parameters:
      context - the context.
      id - the ID.
      descr - the description.
  • Method Details

    • decodeAfterContext

      public void decodeAfterContext(ByteBuffer buf, int length) throws IOException
      Decode this PDU after the end of the encoded context.
      Specified by:
      decodeAfterContext in class AgentXContextPDU
      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

      public void encodeAfterContext(ByteBuffer buf)
      Encode this PDU after already encoded context (thus context will not be encoded by this operation).
      Specified by:
      encodeAfterContext in class AgentXContextPDU
      Parameters:
      buf - the target buffer.
    • getAfterContextLength

      public int getAfterContextLength()
      Gets the encoded length after an already encoded context.
      Specified by:
      getAfterContextLength in class AgentXContextPDU
      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 - an OctetString.
    • setId

      public void setId(org.snmp4j.smi.OID id)
      Sets the ID.
      Parameters:
      id - a OID.