Class RawPduEvent

java.lang.Object
java.util.EventObject
uk.co.westhawk.snmp.event.RawPduEvent
All Implemented Interfaces:
Serializable

public class RawPduEvent extends EventObject
The RawPduEvent class. This class is delivered when a undecoded pdu is received.
Since:
4_14
Version:
$Revision: 1.5 $ $Date: 2006/02/09 14:30:18 $
Author:
Birgit Arkesteijn
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    RawPduEvent(Object source, int v, String hn, byte[] mess, int prt)
    The constructor for an undecoded pdu event.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Consumes this event so that it will not be sent to any other listeners.
    The IP address of the host where the pdu came from.
    int
    The remote port number of the host where the pdu came from.
    byte[]
    The pdu SNMP message in bytes.
    int
    The SNMP version number of the pdu.
    boolean
    Returns whether or not this event has been consumed.

    Methods inherited from class java.util.EventObject

    getSource, toString

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • RawPduEvent

      public RawPduEvent(Object source, int v, String hn, byte[] mess, int prt)
      The constructor for an undecoded pdu event. The ListeningContext class will fire undecoded pdu events.
      Parameters:
      source - The source (ListeningContext) of the event
      v - The SNMP version of the pdu
      hn - The IP address of the host where the pdu came from
      prt - The remote port number of the host where the pdu came from
      mess - The pdu in bytes
      See Also:
  • Method Details

    • getVersion

      public int getVersion()
      The SNMP version number of the pdu.
      Returns:
      The version number.
      See Also:
    • getHostAddress

      public String getHostAddress()
      The IP address of the host where the pdu came from. Note, this is not necessarily the same as the IpAddress field in the SNMPv1 Pdu.
      Returns:
      The IP address of the host or null.
      See Also:
    • getMessage

      public byte[] getMessage()
      The pdu SNMP message in bytes. This is a copy of the original message.
      Returns:
      The pdu in bytes.
      See Also:
    • getHostPort

      public int getHostPort()
      The remote port number of the host where the pdu came from.
      Returns:
      The remote port number of the host or -1.
      See Also:
    • consume

      public void consume()
      Consumes this event so that it will not be sent to any other listeners.
    • isConsumed

      public boolean isConsumed()
      Returns whether or not this event has been consumed.
      See Also: