public class SnmpReceiver extends Object implements DatagramEngine.Listener
Modifier and Type | Class and Description |
---|---|
static interface |
SnmpReceiver.Listener
Provides an interface for the trap receiver.
|
Constructor and Description |
---|
SnmpReceiver(DatagramEngine datagramEngine,
SnmpReceiver.Listener listener)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
onReceive(byte[] payload,
InetSocketAddress remoteAddress)
Called back when a new datagram arrives.
|
void |
stop()
Shutdown the client and underlying engine.
|
public SnmpReceiver(DatagramEngine datagramEngine, SnmpReceiver.Listener listener)
datagramEngine
- datagram engine implementationlistener
- receiver listenerpublic void stop()
public void onReceive(byte[] payload, InetSocketAddress remoteAddress)
DatagramEngine.Listener
onReceive
in interface DatagramEngine.Listener
payload
- received datagram payloadremoteAddress
- remote socket address for received payloadCopyright © 2015. All Rights Reserved.