|
How to plug in your protocol implementation in the SNMP transport provider framework
Provide implementation
of SnmpTransportProvider
- This class provides the open, close, read, and write implementation
required for TCP/IP communication. This can be used to set up the basic
communication between the SNMP entities. Reference Implementation is provided
for TCP.
Provide implementation
of ProtocolOptions
- This class provides the necessary parameters needed for
the protocol communication, such as the host, port etc. for TCP/IP. In
case of the SNMPv3 module, this class contains the implementation of getSessionId.
This is used by the v3 module to uniquely identify each session connection
between the SNMP entities. Therefore for TCP/IP, this can be a combination
of the destination host and port. Reference implementation provided for
TCP.
Provide a configuration file snmpTransport.config that contains the name of the implemented SnmpTransportProvider class. Reference file for TCP is provided in the <conf> directory.
|
|
Note: In the application, the following points should be taken care of while using the transport provider framework.(For actual implementation details, see examples for SNMP GET, SET, etc. for TCP/IP.)
|
How to plug-in your protocol implementation in the SAS transport provider framework
Provide implementation
of the SessionTransportProvider
for the protocol (say SSL) - This class should provide the
open(),
close(), read(), and write() implementation required for
SSL communication. This can be used by both the SAS server and the SAS
client to set up the basic communication and transfer data.
Provide server side and
client side implementation of the TransportProvider
for your protocol - These classes should provide the client
and server side implementation required for creating TransportProvider
and any other protocol initializations, if required. After the TransportProvider
objects are created, all further communication between the client and
the server is handled by the TransportProvider.
Register your protocol with the client side Transport provider by including the class name of the client side implementation of the TransportProvider in the applet's HTML file. For example, if the client side implementation of the TransportProvider is com.adventnet.management.transport.TcpClientTransportImpl.java, then the HTML file would contain the following line.
|
<PARAM NAME = "TRANSPORT_PROVIDER" VALUE="com.adventnet.management.transport.TcpClientTransportImpl"> |
Create an instance of the server side implementation of the TransportProvider (say, com.adventnet.management.transport.TcpServerTransportImpl that implements com.adventnet.snmp.management.transport.TransportProvider)
|
com.adventnet.management.transport.TransportProvider myProtocol = new com.adventnet.management.transport.TcpServerTransportImpl(); |
Register the protocol with the server's transport provider.
|
SAServer mySasServer = new SAServer(serverClient, sessionClientClass); mySasServer.setSASTransportProvider(myProtocol); |
|