Getting Started with the Java Dynamic Management Kit 4.0

Developing A Manager

You can develop a manager in the Java language by using the connector client management interface. The main steps in developing a Java manager are:

Initializing A Connector Client

A connector provides access to MBeans through a communication protocol. It enables management applications to perform management operations on a Java Dynamic Management agent. For a Java Dynamic Management agent to be manageable, it must contain at least one connector. However, a Java Dynamic Management agent can contain many protocol adaptors, allowing it to be managed remotely through different protocols.

The following connectors/protocol adaptors are supplied with the Java Dynamic Management Kit:

RMI Connector

The RMI connector enables Java managers to access a Java Dynamic Management agent using the Java remote operation invocation (RMI) system.

HTTP/TCP Connector

The HTTP/TCP connector enables Java managers to access a Java Dynamic Management agent using HTTP over a TCP/IP connection. It also allows these management applications to access an agent across proxy servers. By default, the HTTP/TCP adaptor listens for incoming requests on port 8081. The HTTP/TCP connector provides login/password authentication.

HTML Protocol Adaptor

The HTML protocol adaptor is an HTML server that enables web browsers to access a Java Dynamic Management agent through the HTTP communication protocol. When an HTML protocol adaptor is instantiated, it creates a TCP/IP socket and waits for incoming requests. By default, the HTML adaptor listens for incoming requests on port 8082. The HTML adaptor provides login/password authentication.

The HTML protocol adaptor is provided as a tool for debugging and speeding the development of agents. As such, it has certain limitations, for example it does not display complex types or multi-dimensional arrays.

SNMP Protocol Adaptor

The SNMP protocol adaptor enables an SNMP manager to perform management operations on a Java Dynamic Management Kit agent. Before using the SNMP protocol adaptor, you need to configure it for the MIB used by the SNMP manager application.

Adding And Implementing Connector/Protocol Adaptor To An Agent

To add a connector/protocol adaptor to an agent, create an instance of the Java class that implements the connector/protocol adaptor you want to use.

Adaptor 

Java Class 

RMI 

com.sun.jdmk.comm.RmiConnectorServer

HTTP/TCP 

com.sun.jdmk.comm.HttpConnectorServer

HTML 

com.sun.jdmk.comm.HtmlAdaptorServer

SNMP 

com.sun.jdmk.comm.SnmpAdaptorServer

The Java Dynamic Management Kit provides the following ways to add a connector/protocol adaptor to an agent:

A connector/protocol adaptor is an abstraction of a communications protocol. This means that the communication mechanism between agent and manager is hidden. The connectors/protocol adaptors provided by the Java Dynamic Management Kit are implemented as MBeans. This enables them to be managed. The Java Dynamic Management Kit does not require a connector/protocol adaptor to conform to a specific interface definition or implementation. However, a connector/protocol adaptor must be able to access the MBean server to retrieve and change information in MBeans in an agent.

Controlling Access By A Manager To An Agent

The Java Dynamic Management Kit provides mechanisms for controlling access by a manager to an agent. The access control operations available depend on the connector/protocol adaptor used.

The Java Dynamic Management Kit does not provide access control for the RMI connector.

The HTTP/TCP connector and the HTML protocol adaptor provide login/password authentication. In this authentication scheme, the client object and the server object contain authentication information. The server side object contains an array of objects that contain authentication information for all known clients. When a client attempts to login, the login/password object that it sends is compared with the array to see if the client is on the list of permitted clients. If the list of permitted clients is null, no client authentication is performed by the adaptor and access is granted to all clients.

Access To A Connector

A connector client enables a Java manager to access MBeans in a remote agent through a particular communications protocol. The Java Dynamic Management Kit provides a connector client for each of the protocols supported . All connector clients have the same interface, meaning that the manager is protocol-independent.

Connector client objects are the objects that management applications use to communicate with the agents that they wish to manipulate. These objects establish a connection to a corresponding connector server in an agent, through the specific protocol they implement. There is thus one connector server and client pair for each protocol supported.

A connector client enables Java managers to perform management operations on a Java agent. Connector clients provide a level of abstraction by allowing a manager to manipulate local objects, the effects of which are remote. The manager does not need information on the protocol used to communicate with the agent; it needs either the class name or object name of the objects to be managed.

There are two ways for a manager to interact with its connector client:

Java managers access a connector through a connector client. The Java Dynamic Management Kit provides connector clients to enable a Java manager to access a connector using these protocols:

Access To A Protocol Adaptor

The purpose of a protocol adaptor is to enable a manager to:

These types of management applications access adaptors directly: