Package uk.co.westhawk.snmp.event
Class RawPduEvent
java.lang.Object
java.util.EventObject
uk.co.westhawk.snmp.event.RawPduEvent
- All Implemented Interfaces:
Serializable
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
ConstructorsConstructorDescriptionRawPduEvent
(Object source, int v, String hn, byte[] mess, int prt) The constructor for an undecoded pdu event. -
Method Summary
Modifier and TypeMethodDescriptionvoid
consume()
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
-
Constructor Details
-
RawPduEvent
The constructor for an undecoded pdu event. The ListeningContext class will fire undecoded pdu events.- Parameters:
source
- The source (ListeningContext) of the eventv
- The SNMP version of the pduhn
- The IP address of the host where the pdu came fromprt
- The remote port number of the host where the pdu came frommess
- 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
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:
-