|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.snmp4j.transport.AbstractTransportMapping<UdpAddress>
org.snmp4j.transport.UdpTransportMapping
public abstract class UdpTransportMapping
The UdpTransportMapping
is the abstract base class for
UDP transport mappings.
Field Summary | |
---|---|
protected UdpAddress |
udpAddress
|
Fields inherited from class org.snmp4j.transport.AbstractTransportMapping |
---|
asyncMsgProcessingSupported, maxInboundMessageSize, transportListener |
Constructor Summary | |
---|---|
UdpTransportMapping(UdpAddress udpAddress)
|
Method Summary | |
---|---|
abstract void |
close()
Closes the transport an releases all bound resources synchronously. |
UdpAddress |
getAddress()
Returns the transport address that is used by this transport mapping for sending and receiving messages. |
UdpAddress |
getListenAddress()
Returns the address that represents the incoming address this transport mapping uses to listen for incoming packets. |
java.lang.Class<? extends Address> |
getSupportedAddressClass()
Gets the Address class that is supported by this transport mapping. |
abstract void |
listen()
Listen for incoming messages. |
abstract void |
sendMessage(UdpAddress address,
byte[] message,
TransportStateReference tmStateReference)
Sends a message to the supplied address using this transport. |
Methods inherited from class org.snmp4j.transport.AbstractTransportMapping |
---|
addTransportListener, fireProcessMessage, getMaxInboundMessageSize, isAsyncMsgProcessingSupported, removeTransportListener, setAsyncMsgProcessingSupported |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.snmp4j.TransportMapping |
---|
isListening |
Field Detail |
---|
protected UdpAddress udpAddress
Constructor Detail |
---|
public UdpTransportMapping(UdpAddress udpAddress)
Method Detail |
---|
public java.lang.Class<? extends Address> getSupportedAddressClass()
TransportMapping
Address
class that is supported by this transport mapping.
getSupportedAddressClass
in interface TransportMapping<UdpAddress>
getSupportedAddressClass
in class AbstractTransportMapping<UdpAddress>
Address
.public UdpAddress getAddress()
Address
used by this transport mapping. The returned
instance must not be modified!public UdpAddress getListenAddress()
TransportMapping
null
this transport
mapping is not configured to listen for incoming packets.public abstract void listen() throws java.io.IOException
TransportMapping
TransportMapping.sendMessage(A, byte[], org.snmp4j.TransportStateReference)
is called for the
first time.
listen
in interface TransportMapping<UdpAddress>
listen
in class AbstractTransportMapping<UdpAddress>
java.io.IOException
- if an IO operation exception occurs while starting the listener.public abstract void close() throws java.io.IOException
TransportMapping
close
in interface TransportMapping<UdpAddress>
close
in class AbstractTransportMapping<UdpAddress>
java.io.IOException
- if any IO operation for the close fails.public abstract void sendMessage(UdpAddress address, byte[] message, TransportStateReference tmStateReference) throws java.io.IOException
TransportMapping
sendMessage
in interface TransportMapping<UdpAddress>
sendMessage
in class AbstractTransportMapping<UdpAddress>
address
- an Address
instance denoting the target address.message
- the whole message as an array of bytes.tmStateReference
- the (optional) transport model state reference as defined by
RFC 5590 section 6.1.
java.io.IOException
- if any underlying IO operation fails.
|
Copyright 2005-2011 Frank Fock (SNMP4J.org) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |