Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 5_1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.co.westhawk.snmp.event
Class RawPduEvent

    java.lang.Object
      |
      +--java.util.EventObject
            |
            +--uk.co.westhawk.snmp.event.RawPduEvent

All Implemented Interfaces:
  java.io.Serializable

public class RawPduEvent
extends java.util.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:
  Serialized Form

Field Summary
`protected boolean` | `consumed`

Fields inherited from class java.util.EventObject
`source`

Constructor Summary
`RawPduEvent(java.lang.Object source, int v, java.lang.String hn, byte[] mess, int prt)` The constructor for an undecoded pdu event.

Method Summary
`void` | `consume()` Consumes this event so that it will not be sent to any other listeners.
`java.lang.String` | `getHostAddress()` The IP address of the host where the pdu came from.
`int` | `getHostPort()` The remote port number of the host where the pdu came from.
`byte[]` | `getMessage()` The pdu SNMP message in bytes.
`int` | `getVersion()` The SNMP version number of the pdu.
`boolean` | `isConsumed()` 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
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### consumed

    protected boolean consumed

Constructor Detail

### RawPduEvent

    public RawPduEvent(java.lang.Object source,
                       int v,
                       java.lang.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:
  `getVersion()`, `getHostAddress()`, `getHostPort()`, `getMessage()`

Method Detail

### getVersion

    public int getVersion()

  The SNMP version number of the pdu.

  Returns:
    The version number.
  See Also:
    `getHostAddress()`, `getMessage()`, `SnmpConstants.SNMP_VERSION_1`, `SnmpConstants.SNMP_VERSION_2c`, `SnmpConstants.SNMP_VERSION_3`

### getHostAddress

    public java.lang.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:
    `getVersion()`, `getMessage()`

### 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:
    `getVersion()`, `getHostAddress()`

### 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:
    `getVersion()`, `getMessage()`

### 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:
    `consume()`

Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 5_1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD