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.examplev3
Class ReceiveTrap

    java.lang.Object
      |
      +--uk.co.westhawk.examplev3.ReceiveTrap

All Implemented Interfaces:
  java.util.EventListener, java.util.Observer, RawPduListener, RequestPduListener, TrapListener

public class ReceiveTrap
extends java.lang.Object
implements RequestPduListener, RawPduListener, TrapListener, java.util.Observer

The ReceiveTrap receives traps.

The host, port, etc can be configured in the properties file. The name of the properties file can be passed as first argument to this application. If there is no such argument, it will look for `ReceiveTrap.properties`. If this file does not exist, the application will use default parameters.

On UNIX and Linux you will have to run this application as root.

Version:
  $Revision: 1.8 $ $Date: 2006/02/08 12:16:03 $
Author:
  Birgit Arkesteijn
See Also:
  `SnmpContextv3`

Field Summary

Fields inherited from interface uk.co.westhawk.snmp.event.RequestPduListener
`version_id`

Fields inherited from interface uk.co.westhawk.snmp.event.RawPduListener
`version_id`

Fields inherited from interface uk.co.westhawk.snmp.event.TrapListener
`version_id`

Constructor Summary
`ReceiveTrap(java.lang.String propertiesFilename)` Constructor.

Method Summary
`void` | `destroy()`
`void` | `init()`
`static void` | `main(java.lang.String[] args)`
`void` | `rawPduReceived(RawPduEvent evt)` Invoked when a pdu is received.
`void` | `requestPduReceived(RequestPduEvent evt)` Received a pdu request.
`void` | `trapReceived(TrapEvent evt)` Invoked when a trap is received.
`void` | `update(java.util.Observable obs, java.lang.Object ov)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ReceiveTrap

    public ReceiveTrap(java.lang.String propertiesFilename)

  Constructor.

Parameters:
  `propertiesFilename` - The name of the properties file. Can be null.

Method Detail

### init

    public void init()

### update

    public void update(java.util.Observable obs,
                       java.lang.Object ov)

  Specified by:
    `update` in interface `java.util.Observer`

### destroy

    public void destroy()

### trapReceived

    public void trapReceived(TrapEvent evt)

  Description copied from interface: `TrapListener`
  Invoked when a trap is received.

  Specified by:
    `trapReceived` in interface `TrapListener`

### requestPduReceived

    public void requestPduReceived(RequestPduEvent evt)

  Received a pdu request. If it is Get(sysContact.0), send an answer back.

  Specified by:
    `requestPduReceived` in interface `RequestPduListener`

### rawPduReceived

    public void rawPduReceived(RawPduEvent evt)

  Description copied from interface: `RawPduListener`
  Invoked when a pdu is received.

  Specified by:
    `rawPduReceived` in interface `RawPduListener`

### main

    public static void main(java.lang.String[] args)

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