Java Reference
In-Depth Information
ch12.timer.periodic20
ch12.timer.periodic
ch12.timer.periodic20
ch12.timer.periodic20
ch12.timer.periodic20
ch12.timer.periodic
This is just a sample of the generated output. The notification type
ch12.timer.peri-
odic
should print out every six seconds, and the
ch12.timer.periodic12
type should
print out 20 times, once every two seconds.
12.6 Summary
This chapter finished the agent services portion of the topic by discussing the
monitoring and timer services that are present in all
JMX
-compliant agents. This
chapter showed how you can use the monitoring services to observe MBean
attributes with
String
and numeric value types. In addition, you can use the
monitors to send notifications based on the events generated from observing
their target MBean attributes. The chapter presented all three monitor types:
String, Gauge, and Counter. In addition, we presented an example that demon-
strates how you might use monitors to take corrective action upon observing a
certain condition in the watched MBean attribute.
The second half of the chapter examined the timer service. The timer service
allows you to emit custom notification types at predefined intervals. You can tell
the timer to send the dated notifications once, or to send them periodically after
their due date has been reached. In addition, if notifications have passed their
due dates before the timer has started, you can optionally ask the timer to send
all past-due notifications so that none are lost.
This chapter concludes the third part of the topic. Part 4 of the topic discusses
using
JMX
with Java
J2EE
.