Interface | Description |
---|---|
ConnectionOrientedTransportMapping<A extends Address> |
Transport mappings for connection oriented transport protocols have to
implement this interface.
|
MessageLengthDecoder |
The
MessageLengthDecoder needs to be implemented for connection
oriented transport mappings, because those transport mappings have no message
boundaries. |
TLSTM.TLSTMTrustManagerFactory | |
TransportListener |
The
TransportListener interface is implemented by objects
that process incoming messages from TransportMapping s, for
example MessageDispatcher . |
TransportStateListener |
The
TransportStateListener interface can be implemented
to monitor the connection state for connection oriented transport mappings. |
Class | Description |
---|---|
AbstractTransportMapping<A extends Address> |
The
AbstractTransportMapping provides an abstract
implementation for the message dispatcher list and the maximum inbound
message size. |
DefaultSshTransportMapping |
The
DefaultSshTransportMapping implements a TCP transport
mapping with TLS according to RFC 5592 (named SSHTM therein). |
DefaultTcpTransportMapping |
The
DefaultTcpTransportMapping implements a TCP transport
mapping with the Java 1.4 new IO API. |
DefaultTcpTransportMapping.SnmpMesssageLengthDecoder | |
DefaultUdpTransportMapping |
The
DefaultUdpTransportMapping implements a UDP transport
mapping based on Java standard IO and using an internal thread for
listening on the inbound socket. |
DummyTransport<A extends IpAddress> |
The
DummyTransport is a test TransportMapping for Command Generators
which actually does not sent messages over the network. |
MessageLength |
The
MessageLength object contains information about the
length of a message and the length of its header. |
TcpTransportMapping |
The
TcpTransportMapping is the abstract base class for
TCP transport mappings. |
TLSTM |
The
TLSTM implements the Transport Layer Security
Transport Mapping (TLS-TM) as defined by RFC 5953
with the new IO API and SSLEngine . |
TransportMappings |
The
TransportMappings factory can be used to create a transport
mapping for an address class. |
TransportStateEvent |
The
TransportStateEvent describes a state change for
a transport connection. |
UdpTransportMapping |
The
UdpTransportMapping is the abstract base class for
UDP transport mappings. |
Exception | Description |
---|---|
UnsupportedAddressClassException |
The
UnsupportedAddressClassException indicates a message
exception caused by unsupported address class. |
The 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:
DefaultUdpTransportMapping
class.
DefaultTcpTransportMapping
using the java.nio
package.
Additional transport mappings can be easily added. It is sufficient to
implement the org.snmp4j.TransportMapping
interface and add
an instance of that class to the Snmp
(or MessageDispatcher
)
object. To be able to lookup a transport mapping by an Address
class via the TransportMappings
(as Snmp
does
for notification listeners), a transport mapping has to be registered
in a transport mapping registration file. The default file is
transports.properties
in the org.snmp4j.transport
package. To use a different file, set the system property
org.snmp4j.transportMappings
.
Connection-oriented transport mappings like TCP should implement
the ConnectionOrientedTransportMapping
interface to support
MessageLengthDecoder
and TransportStateListener
.
The following UML class diagram shows the classes of the
org.snmp4j.transport
package and their relationships
(relationships to other packages are not shown):
Copyright © 2018 SNMP4J.org. All rights reserved.