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.
SnmpContextv3
Constructor and Description |
---|
ReceiveTrap(java.lang.String propertiesFilename)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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) |
public ReceiveTrap(java.lang.String propertiesFilename)
propertiesFilename
- The name of the properties file. Can be
null.public void init()
public void update(java.util.Observable obs, java.lang.Object ov)
update
in interface java.util.Observer
public void destroy()
public void trapReceived(TrapEvent evt)
TrapListener
trapReceived
in interface TrapListener
public void requestPduReceived(RequestPduEvent evt)
requestPduReceived
in interface RequestPduListener
public void rawPduReceived(RawPduEvent evt)
RawPduListener
rawPduReceived
in interface RawPduListener
public static void main(java.lang.String[] args)