|
The SAS API uses TCP as the default transport protocol and also supports HTTP protocol. Apart from this, it also uses the protocol-independent transport provider for SAS communication, where the users can plug-in their own transport protocol between the SAS Client and the SAS server.
The transport provider is responsible for all communication aspects between the client and server and interfaces with the SNMP API to communicate. It essentially acts as a bridge between the SNMP API and the actual transport protocol. The advantage of using this approach is that the SNMP API need not be aware of the underlying protocol used. For using a particular transport protocol, the user has to implement that protocol and plug-in (or register) it with the transport provider. Only one transport protocol can register with the provider at a time.

APIs for the SAS transport implementation
These interfaces are part of the com.adventnet.management.transportpackage.
SessionTransportProvider
- This interface provides the basic IO operations. It contains the following API methods: (Refer the Javadocs for the exact syntax)
open() - Opens the transport interface over which the data is sent/received.
close() - Closes the transport interface after communication is over.
read() - Receives data from the peer over the transport interface.
write() - Sends data to the peer over the transport interface.
- This interface is responsible for creating a transport session between the client and server. It contains the following API methods: (Refer the Javadocs for the exact syntax)
init() - Initializes the transport session over which the data is sent/received.
open() - Creates the transport session for SAS communication and returns a reference to the SessionTransportProvider object.
close() - Closes the transport interface after communication is over.
You can also implement your own transport provider. Refer Custom Transport Provider for more information.
|