Java Dynamic Management Kit 5.1 Tools Reference Guide

2.1 HTML Connections

The HTML adaptor is an instance of the com.sun.jdmk.comm.HtmlAdaptorServer MBean. Your agent application must instantiate this class, register the MBean, and explicitly start the MBean by invoking its start method to allow HTML connections. When the HTML protocol adaptor is started, it creates a TCP/IP socket, listens for manager connections, and waits for incoming requests. By default, the HTML adaptor listens for incoming requests on port 8082. You can change this default value by specifying a port number:

If a manager tries to connect, the HtmlAdaptorServer creates a thread which receives and processes all subsequent requests from this manager. The number of managers is limited by the maxActiveClientCount property. The default value of the maxActiveClientCount is 10.

When an HtmlAdaptorServer is stopped, all current connections are interrupted (some requests might be terminated abruptly), and the TCP/IP socket is closed. The HtmlAdaptorServer can perform user authentication. The addUserAuthenticationInfo method and the removeUserAuthenticationInfo method can be used to manage users and their corresponding authentication information. The HTML server uses the Basic Authentication Scheme, as defined in RFC 1945, section 11.1, to authenticate clients which connect to the server.

Before connecting a web browser to an agent, you must make sure that:

To connect a browser to an agent, open the page given by the following URL in a web browser.

http://host:port

In the URL above, host is the host name of the machine on which the agent is running. The port is the port number used by the HTML adaptor in the agent. The default port number is 8082.