Module org.snmp4j
Package org.snmp4j.mp

Class PduHandle

  • All Implemented Interfaces:
    java.io.Serializable

    public class PduHandle
    extends java.lang.Object
    implements java.io.Serializable
    The PduHandle class represents an unique key for a SNMP PDU. It uses an unique transaction ID (request ID) to identify the PDUs.
    Since:
    1.0
    Version:
    1.0.3
    Author:
    Frank Fock
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int NONE  
    • Constructor Summary

      Constructors 
      Constructor Description
      PduHandle()
      Creates a PduHandle with a transaction ID set to NONE.
      PduHandle​(int transactionID)
      Creates a PduHandle for the supplied transaction ID.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void copyFrom​(PduHandle other)
      Copy all members from the supplied PduHandle.
      boolean equals​(java.lang.Object obj)
      Indicates whether some other object is "equal to" this one.
      int getTransactionID()
      Gets the transaction ID of this handle.
      int hashCode()
      Returns a hash code value for the object.
      void setTransactionID​(int transactionID)
      Sets the transaction ID which is typically the request ID of the PDU.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PduHandle

        public PduHandle()
        Creates a PduHandle with a transaction ID set to NONE.
      • PduHandle

        public PduHandle​(int transactionID)
        Creates a PduHandle for the supplied transaction ID.
        Parameters:
        transactionID - an unqiue transaction ID.
    • Method Detail

      • getTransactionID

        public int getTransactionID()
        Gets the transaction ID of this handle.
        Returns:
        the transaction ID.
      • setTransactionID

        public void setTransactionID​(int transactionID)
        Sets the transaction ID which is typically the request ID of the PDU.
        Parameters:
        transactionID - an unqiue transaction ID.
      • copyFrom

        public void copyFrom​(PduHandle other)
        Copy all members from the supplied PduHandle.
        Parameters:
        other - a PduHandle.
      • equals

        public boolean equals​(java.lang.Object obj)
        Indicates whether some other object is "equal to" this one.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if this object is the same as the obj argument; false otherwise.
      • hashCode

        public int hashCode()
        Returns a hash code value for the object.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        a hash code value for this object.
      • toString

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