|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.snmp4j.transport.AbstractTransportMapping
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. |
Address |
getListenAddress()
Returns the address that represents the incoming address this transport mapping uses to listen for incoming packets. |
java.lang.Class |
getSupportedAddressClass()
Gets the Address class that is this transport mapping
supports. |
abstract void |
listen()
Listen for incoming messages. |
abstract void |
sendMessage(Address address,
byte[] message)
Sends a message to the supplied address using this transport. |
Methods inherited from class org.snmp4j.transport.AbstractTransportMapping |
---|
addMessageDispatcher, addTransportListener, fireProcessMessage, getMaxInboundMessageSize, isAsyncMsgProcessingSupported, removeMessageDispatcher, 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 getSupportedAddressClass()
TransportMapping
Address
class that is this transport mapping
supports.
getSupportedAddressClass
in interface TransportMapping
getSupportedAddressClass
in class AbstractTransportMapping
Address
.public UdpAddress getAddress()
Address
used by this transport mapping. The returned
instance must not be modified!public Address 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(org.snmp4j.smi.Address, byte[])
is called for the
first time.
listen
in interface TransportMapping
listen
in class AbstractTransportMapping
java.io.IOException
public abstract void close() throws java.io.IOException
TransportMapping
close
in interface TransportMapping
close
in class AbstractTransportMapping
java.io.IOException
public abstract void sendMessage(Address address, byte[] message) throws java.io.IOException
TransportMapping
sendMessage
in interface TransportMapping
sendMessage
in class AbstractTransportMapping
address
- an Address
instance denoting the target address.message
- the whole message as an array of bytes.
java.io.IOException
|
Copyright 2005-2010 Frank Fock (SNMP4J.org) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |