Class AgentXOpenPDU

java.lang.Object
org.snmp4j.agent.agentx.AgentXPDU
org.snmp4j.agent.agentx.AgentXOpenPDU
All Implemented Interfaces:
Serializable

public class AgentXOpenPDU extends AgentXPDU
The AgentXOpenPDU represents the agentx-CleanupSet-PDU defined by RFC 2741.
See Also:
  • Field Details

    • timeout

      protected byte timeout
      AgentX timeout in seconds.
    • subagentID

      protected org.snmp4j.smi.OID subagentID
      The sub-agent ID.
    • subagentDescr

      protected org.snmp4j.smi.OctetString subagentDescr
      The subagent description.
  • Constructor Details

    • AgentXOpenPDU

      public AgentXOpenPDU(int sessionID, int transactionID, int packetID, byte timeout, org.snmp4j.smi.OID subagentID, org.snmp4j.smi.OctetString subagentDescr)
      Creates a AgentXOpenPDU.
      Parameters:
      sessionID - a session ID.
      transactionID - a transaction ID.
      packetID - a packet ID.
      timeout - the packet timeout.
      subagentID - the sub-agent ID
      subagentDescr - the sub-agent description.
  • Method Details

    • decodePayload

      public void decodePayload(ByteBuffer buf, int length) throws IOException
      Description copied from class: AgentXPDU
      Decode this PDU's payload.
      Specified by:
      decodePayload in class AgentXPDU
      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.
    • getSubagentDescr

      public org.snmp4j.smi.OctetString getSubagentDescr()
      Gets the sub-agent description.
      Returns:
      a secription.
    • getSubagentID

      public org.snmp4j.smi.OID getSubagentID()
      Gets the sub-agent ID.
      Returns:
      a OID.
    • getTimeout

      public byte getTimeout()
      Gets the session timeout.
      Returns:
      the timeout in seconds.
    • setSubagentDescr

      public void setSubagentDescr(org.snmp4j.smi.OctetString subagentDescr)
      Gets the sub-agent description.
      Parameters:
      subagentDescr - the sub-agent description.
    • setSubagentID

      public void setSubagentID(org.snmp4j.smi.OID subagentID)
      Sets the sub-agent ID.
      Parameters:
      subagentID - the sub-agent ID.
    • setTimeout

      public void setTimeout(byte timeout)
      Sets the session timeout in seconds.
      Parameters:
      timeout - the timeout in seconds.
    • getPayloadLength

      public int getPayloadLength()
      Description copied from class: AgentXPDU
      Gets the payload length.
      Specified by:
      getPayloadLength in class AgentXPDU
      Returns:
      the payload length.
    • encodePayload

      public void encodePayload(ByteBuffer buf)
      Description copied from class: AgentXPDU
      Encode the payload to the given byte buffer.
      Specified by:
      encodePayload in class AgentXPDU
      Parameters:
      buf - the buffer.
    • beforeEncode

      protected void beforeEncode()
      Description copied from class: AgentXPDU
      Initialize flags and other things before a PDU is encoded.
      Specified by:
      beforeEncode in class AgentXPDU