|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TransportMapping
The TransportMapping
defines the common interface for SNMP
transport mappings. A transport mapping can only support a single
transport protocol.
Method Summary | |
---|---|
void |
addMessageDispatcher(MessageDispatcher dispatcher)
Deprecated. Use addTransportListener(org.snmp4j.transport.TransportListener) instead. This method has
been deprecated because the direct coupling between MessageDispatcher
and TransportMappings is not flexible enough and prevents reusing
TransportMappings for other purposes. This method will be removed
with SNMP4J 2.0. |
void |
addTransportListener(TransportListener transportListener)
Adds a transport listener to the transport. |
void |
close()
Closes the transport an releases all bound resources synchronously. |
Address |
getListenAddress()
Returns the address that represents the incoming address this transport mapping uses to listen for incoming packets. |
int |
getMaxInboundMessageSize()
Gets the maximum length of an incoming message that can be successfully processed by this transport mapping implementation. |
java.lang.Class |
getSupportedAddressClass()
Gets the Address class that is this transport mapping
supports. |
boolean |
isListening()
Returns true if the transport mapping is listening for
incoming messages. |
void |
listen()
Listen for incoming messages. |
void |
removeMessageDispatcher(MessageDispatcher dispatcher)
Deprecated. Use removeTransportListener(org.snmp4j.transport.TransportListener) instead. |
void |
removeTransportListener(TransportListener transportListener)
Removes a transport listener. |
void |
sendMessage(Address address,
byte[] message)
Sends a message to the supplied address using this transport. |
Method Detail |
---|
java.lang.Class getSupportedAddressClass()
Address
class that is this transport mapping
supports.
Address
.Address getListenAddress()
null
this transport
mapping is not configured to listen for incoming packets.void sendMessage(Address address, byte[] message) throws java.io.IOException
address
- an Address
instance denoting the target address.message
- the whole message as an array of bytes.
java.io.IOException
void addMessageDispatcher(MessageDispatcher dispatcher)
addTransportListener(org.snmp4j.transport.TransportListener)
instead. This method has
been deprecated because the direct coupling between MessageDispatcher
and TransportMappings is not flexible enough and prevents reusing
TransportMappings for other purposes. This method will be removed
with SNMP4J 2.0.
dispatcher
- a MessageDispatcher instance.MessageDispatcherImpl
void removeMessageDispatcher(MessageDispatcher dispatcher)
removeTransportListener(org.snmp4j.transport.TransportListener)
instead.
dispatcher
- a previously added MessageDispatcher instance.addMessageDispatcher(org.snmp4j.MessageDispatcher)
void addTransportListener(TransportListener transportListener)
transportListener
- a TransportListener
instance.void removeTransportListener(TransportListener transportListener)
TransportListener
.
transportListener
- a TransportListener
instance.void close() throws java.io.IOException
java.io.IOException
void listen() throws java.io.IOException
sendMessage(org.snmp4j.smi.Address, byte[])
is called for the
first time.
java.io.IOException
boolean isListening()
true
if the transport mapping is listening for
incoming messages. For connection oriented transport mappings this
is a prerequisite to be able to send SNMP messages. For connectionless
transport mappings it is a prerequisite to be able to receive responses.
true
if this transport mapping is listening for messages.int getMaxInboundMessageSize()
|
Copyright 2005-2010 Frank Fock (SNMP4J.org) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |