Java Reference
In-Depth Information
Make the port a value that is available for use. For the remainder of this topic, we
will use the HTML adapter on port 9092.
Once you have a valid port value, open your browser and point it to http://
localhost:9092. (If you have specified a different port, be sure to use that one
instead of 9092.)
The HTML adapter running in your agent is now listening on the specified
port for HTTP requests. When you open your browser to that address, the
adapter responds by sending back HTML . You can now manage your agent by
interacting with the adapter via this HTML .
Before continuing, you should congratulate yourself: you have successfully
created your first MBean and agent. The next section will walk you through com-
municating with your agent using the HTML adapter.
2.5 Working with the HTML adapter
Now that you have the HTML adapter up and running on an agent that contains
an MBean, it is time to connect and see what it provides for you. The HTML
adapter provides access to a JMX agent through an HTML client (any web
browser will do). It contains three main pages:
Agent View— The Agent View is the first page you will see; it provides a
summary of the MBeans contained within the agent. From this page you
can filter the MBean list to provide more refined views.
MBean View— This page provides details about a specific MBean. From this
page you can set and get MBean attributes and invoke MBean operations.
Admin View— This page enables you to register new MBeans on the agent.
2.5.1
Agent View
After contacting the agent with your web browser, the Agent View page appears
(figure 2.5). Agent View is an HTML page received from the agent's HTML
adapter; it shows you all the registered MBeans in this agent, representing them
by presenting their ObjectName values. From this page, you can get to the MBean
View or Admin View HTML page. Before checking out the other views, notice the
Filter by Object Name field at the top of the page. Right now it displays *:*,
which tells the agent to return a list of all the MBeans it contains. The MBean
count on this page displays the total MBeans returned by each search.
This filter form allows you to filter the MBean list by partial or whole object
names. For instance, if you type HelloAgent:name=helloWorld1 into the field,
Search WWH ::




Custom Search