SNMP Stack 4_12

uk.co.westhawk.examplev2c
Class ReceiveTrap

java.lang.Object
  |
  +--uk.co.westhawk.examplev2c.ReceiveTrap
All Implemented Interfaces:
java.util.EventListener, java.util.Observer, TrapListener

public class ReceiveTrap
extends java.lang.Object
implements 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.3 $ $Date: 2002/11/04 17:55:11 $
Author:
Birgit Arkesteijn
See Also:
SnmpContextv2c

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 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

main

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

SNMP Stack 4_12