|
22.1 Overview
22.2 AdventNet Adaptor Framework
22.3 Creating a Custom Protocol Adaptor
22.4 Methods To Be Implemented in the Abstract Adaptor Class
22.5 Limitations
Protocol adaptors provide a view of an agent and its MBeans through a different protocol. They receive the protocol messages, for example, an SNMP PDU/TL1 Command/ HTTP request etc., and convert them into a single Java API call on the MBean Server. The MBean Server invokes the methods on the Common Instrumentation. The view of the agent and the range of possible requests depend upon the given protocol.
All the protocol-specific conversion intelligence, for example converting an SNMP PDU to a Java Method call on the MBean Server lies within the Adapters built for the specific protocol. For example, AdventNet provides an HTML adaptor, which presents the agent and its MBeans as HTML pages viewable in any Web browser. This mapping of the protocol information to the respective MBeans will be handled within the Adapters. In general, a protocol adaptor tries to map the elements of the multi-protocol architecture into the structures provided by the given protocol.
The Multi-Protocol agent framework allows to add protocol adaptors/connectors to the framework without disturbing the instrumentation done earlier. It provides APIs to access the MBean (instrumentation) information which can be used by the user defined protocol adaptor to be added to the framework. Also this newly developed protocol adaptor can also be added to the agent on the fly using MLet (Management Applet) service, thus ensuring the dynamic behavior, a key factor for network management.
The following diagram explains the concept of "Instrument Once Access With Any Protocol", using Multi-Protocol agent framework.
This document aims at providing a brief understanding of the existing AdventNet Adaptor framework and how to integrate a new Adaptor based on the AdventNet Framework.
22.2 AdventNet Adaptor Framework
The following is a pictorial representation of the Adapter Framework provided by AdventNet.
The AdventNet Multi-Protocol agent supports SNMP, HTTP, and TL1 adaptors . All the Adapters extend from a base class called the Abstract Adaptor class. This Abstract Adaptor defines the core methods that are common to all the Adapters.
In AdventNet architecture, the adaptors themselves are MBeans and hence, the adaptors themselves can be managed at run time. Following the AdventNet framework for adaptors, you can write your own Adaptor MBean, which can be registered with the MBean Server like all the other Adaptors.
22.3 Creating a Custom Protocol Adaptor
To write a new protocol adaptor for the AdventNet Multi-Protocol agent, you have to extend the Abstract Adaptor Class and implement certain methods available in this class. This class abstracts the common behavior of all Adaptors. All protocol adaptors must extend this class .
For example, if you have a Q3 protocol implementation ready, i.e.,an API that can process the Q3 message formats, you can extend the Abstract Adaptor class and write a Q3 adapter which will define the mapping for the Q3 message to map to a particular MBean in the MBean Server.
When a Q3 request comes in, the Q3 adapter looks up the mapping table, identifies the corresponding MBean in the MBean Server, invokes the method on it and processes the return value and converts it into a Q3 response, and sends it back.
22.4 Methods To Be Implemented in the Abstract Adaptor Class
To create a custom protocol adaptor, the following methods available in the Abstract Adaptor class have to be implemented.
bind()
This method is used to bind the Adaptor to a Naming service . Those
adaptors that need not bind to a Naming Service may provide a blank implementation.
|
protected abstract void bind() |
destroyAdaptor()
This method is used to kill the adaptor and release all its resources.
|
protected abstract void destroyAdaptor() |
InstantiateAdaptor()
Must be implemented by the adaptor and should be used to instantiate
itself. If the Adaptor instantiation fails, it must throw InstantiationException.
|
protected abstract void instantiateAdaptor() |
unbind()
This method is used to unbind the Adaptor from a naming service. Adaptors
that do not make use of naming service may provide a blank implementation.
|
protected abstract void unbind() |
Due to limitations of the chosen protocol, adaptors have the following limitations:
Not all data types are necessarily supported.
Not all management requests are necessarily supported, as some requests may rely on unsupported data types.
Notifications from a broadcaster MBean may not be supported.
A given protocol adaptor may require private data structures or helper MBeans in order to respond to requests.
|