The class that implements the Monitor behavior of the JMX specification.
IMPLEMENTATION NOTE:
There is one single thread that handles monitoring, for all monitor objects.
There is one single task per each monitor object that runs.
The queue will have possibly many tasks per each monitor type.
Each monitor handles many MBeans, but only one attribute; however, both MBeans and attribute can be changed,
though it would be a strange way to use the monitor.
addNotificationListener
public void addNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
Object handback)
throws IllegalArgumentException
clearObservedObjects
public void clearObservedObjects()
createMonitorNotification
protected javax.management.Notification createMonitorNotification(String type,
long sequence,
String message,
javax.management.ObjectName observed,
String attribute,
Object gauge,
Object trigger)
createNotificationEmitter
protected javax.management.NotificationBroadcasterSupport createNotificationEmitter()
getLogger
protected Logger getLogger()
monitor
protected abstract void monitor(javax.management.ObjectName name,
String attribute,
Object value,
MX4JMonitor.MonitorInfo info)
postDeregister
public void postDeregister()
- postDeregister in interface javax.management.MBeanRegistration
postRegister
public void postRegister(Boolean registrationDone)
- postRegister in interface javax.management.MBeanRegistration
preDeregister
public void preDeregister()
- preDeregister in interface javax.management.MBeanRegistration
preRegister
public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
- preRegister in interface javax.management.MBeanRegistration
removeMonitorInfo
protected void removeMonitorInfo(javax.management.ObjectName name)
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener)
throws javax.management.ListenerNotFoundException
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
Object handback)
throws javax.management.ListenerNotFoundException
sendErrorNotification
protected void sendErrorNotification(MX4JMonitor.MonitorInfo info,
String type,
String message,
javax.management.ObjectName observed,
String attribute)
sendNotification
protected void sendNotification(String type,
String message,
javax.management.ObjectName name,
String attribute,
Object gauge,
Object trigger)
sendNotification
public void sendNotification(javax.management.Notification notification)
startMonitor
protected void startMonitor()
stopMonitor
protected void stopMonitor()