public class SimpleUdpTransportMapping
extends org.snmp4j.transport.DefaultUdpTransportMapping
implements org.snmp4j.CommandResponder
SimpleUdpTransportMapping extends the SNMP4J Default
UDP transport mapping and implements CommandResponder for listening on
the inbound socket. It has a method of receive() which returns an array
of strings with first two members of type and address. It should be used
only if the listener is not running. It requires Java 1.4 or above.
| Constructor and Description |
|---|
SimpleUdpTransportMapping() |
SimpleUdpTransportMapping(org.snmp4j.smi.UdpAddress udpAddress) |
| Modifier and Type | Method and Description |
|---|---|
void |
processPdu(org.snmp4j.CommandResponderEvent e)
It is the default callback method for processing incoming request,
report and notification PDU.
|
java.lang.String[] |
receive(java.net.DatagramPacket packet)
It receives an SNMP packet and invokes the callback method to process
it.
|
close, getPriority, getReceiveBufferSize, getSocketTimeout, getThreadName, isListening, listen, sendMessage, setMaxInboundMessageSize, setPriority, setReceiveBufferSize, setSocketTimeout, setThreadNamegetAddress, getListenAddress, getSupportedAddressClasspublic SimpleUdpTransportMapping()
throws java.io.IOException
java.io.IOExceptionpublic SimpleUdpTransportMapping(org.snmp4j.smi.UdpAddress udpAddress)
throws java.io.IOException
java.io.IOExceptionpublic void processPdu(org.snmp4j.CommandResponderEvent e)
processPdu in interface org.snmp4j.CommandResponderpublic java.lang.String[] receive(java.net.DatagramPacket packet)
throws java.io.IOException
java.io.IOException