org.snmp4j.transport classes are capable of sending and
receiving byte messages to and from a network using transport mapping specific
transport protocol. All SNMP4J transport mappings have to implement the
org.snmp4j.TransportMapping interface. SNMP4J supports two
transport mappings for the transport protocols UDP and TCP:
The UDP transport mapping is the default SNMP transport mapping. It is
implemented by the
The TCP transport mapping is implemented by the
Additional transport mappings can be easily added. It is sufficient to
org.snmp4j.TransportMapping interface and add
an instance of that class to the
object. To be able to lookup a transport mapping by an
class via the
for notification listeners), a transport mapping has to be registered
in a transport mapping registration file. The default file is
transports.properties in the
package. To use a different file, set the system property
Connection-oriented transport mappings like TCP should implement
ConnectionOrientedTransportMapping interface to support
The following UML class diagram shows the classes of the
org.snmp4j.transport package and their relationships
(relationships to other packages are not shown):
Interface Summary Interface Description ConnectionOrientedTransportMapping<A extends Address>Transport mappings for connection oriented transport protocols have to implement this interface. MessageLengthDecoderThe
MessageLengthDecoderneeds to be implemented for connection oriented transport mappings, because those transport mappings have no message boundaries.
TransportListenerinterface is implemented by objects that process incoming messages from
TransportMappings, for example
TransportStateListenerinterface can be implemented to monitor the connection state for connection oriented transport mappings.
Class Summary Class Description AbstractServerSocket<A extends Address>The
AbstractServerSocketinterface provides methods to manage the sockets of a connection oriented transport mapping listening for incoming requests.
AbstractSocketEntry AbstractTcpServerThread<S extends AbstractSocketEntry> AbstractTransportMapping<A extends Address>The
AbstractTransportMappingprovides an abstract implementation for the message dispatcher list and the maximum inbound message size.
DefaultTcpTransportMappingimplements a TCP transport mapping with the Java 1.4 new IO API.
DefaultUdpTransportMappingimplements a UDP transport mapping based on Java standard IO and using an internal thread for listening on the inbound socket.
DTLSTMimplements the Datagram Transport Layer Security Transport Mapping (TLS-TM) as defined by RFC 5953 with the new IO API and
DummyTransport<A extends IpAddress>The
DummyTransportis a test TransportMapping for Command Generators which actually does not sent messages over the network.
MessageLengthobject contains information about the length of a message and the length of its header.
SocketTimeout<A extends Address>The
TimerTaskthat provides means to detect when a socket is not used for predefined time and then close the socket and free its resources.
TcpTransportMapping<S extends AbstractSocketEntry>The
TcpTransportMappingis the abstract base class for TCP transport mappings.
TLSTMimplements the Transport Layer Security Transport Mapping (TLS-TM) as defined by RFC 5953 with the new IO API and
TransportMappingsfactory can be used to create a transport mapping for an address class.
TransportStateEventdescribes a state change for a transport connection.
UdpTransportMappingis the abstract base class for UDP transport mappings.
Exception Summary Exception Description UnsupportedAddressClassExceptionThe
UnsupportedAddressClassExceptionindicates a message exception caused by unsupported address class.