mx4j.monitor
Class MX4JMonitor
public abstract
class
MX4JMonitor
extends StandardMBean
implements MX4JMonitorMBean, MBeanRegistration, NotificationEmitter
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.
Version: $Revision: 1.4 $
Method Summary |
void | addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) |
void | addObservedObject(ObjectName name) |
void | clearObservedObjects() |
boolean | containsObservedObject(ObjectName name) |
protected abstract MX4JMonitor.MonitorInfo | createMonitorInfo() |
protected Notification | createMonitorNotification(String type, long sequence, String message, ObjectName observed, String attribute, Object gauge, Object trigger) |
protected NotificationBroadcasterSupport | createNotificationEmitter() |
long | getGranularityPeriod() |
protected Logger | getLogger() |
protected MX4JMonitor.MonitorInfo | getMonitorInfo(ObjectName name) |
String | getObservedAttribute() |
ObjectName[] | getObservedObjects() |
boolean | isActive() |
protected abstract void | monitor(ObjectName name, String attribute, Object value, MX4JMonitor.MonitorInfo info) |
void | postDeregister() |
void | postRegister(Boolean registrationDone) |
void | preDeregister() |
ObjectName | preRegister(MBeanServer server, ObjectName name) |
protected void | putMonitorInfo(ObjectName name, MX4JMonitor.MonitorInfo info) |
protected void | removeMonitorInfo(ObjectName name) |
void | removeNotificationListener(NotificationListener listener) |
void | removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) |
void | removeObservedObject(ObjectName name) |
protected void | sendErrorNotification(MX4JMonitor.MonitorInfo info, String type, String message, ObjectName observed, String attribute) |
void | sendNotification(Notification notification) |
protected void | sendNotification(String type, String message, ObjectName name, String attribute, Object gauge, Object trigger) |
void | setGranularityPeriod(long granularity) |
void | setObservedAttribute(String attribute) |
void | start() |
protected void | startMonitor() |
void | stop() |
protected void | stopMonitor() |
protected MX4JMonitor(Class management)
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
public void addObservedObject(ObjectName name)
public void clearObservedObjects()
public boolean containsObservedObject(ObjectName name)
protected Notification createMonitorNotification(String type, long sequence, String message, ObjectName observed, String attribute, Object gauge, Object trigger)
protected NotificationBroadcasterSupport createNotificationEmitter()
public long getGranularityPeriod()
public String getObservedAttribute()
public ObjectName[] getObservedObjects()
public boolean isActive()
protected abstract void monitor(ObjectName name, String attribute, Object value,
MX4JMonitor.
MonitorInfo info)
public void postDeregister()
public void postRegister(Boolean registrationDone)
public void preDeregister()
public ObjectName preRegister(MBeanServer server, ObjectName name)
protected void removeMonitorInfo(ObjectName name)
public void removeNotificationListener(NotificationListener listener)
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
public void removeObservedObject(ObjectName name)
protected void sendErrorNotification(
MX4JMonitor.
MonitorInfo info, String type, String message, ObjectName observed, String attribute)
public void sendNotification(Notification notification)
protected void sendNotification(String type, String message, ObjectName name, String attribute, Object gauge, Object trigger)
public void setGranularityPeriod(long granularity)
public void setObservedAttribute(String attribute)
public void start()
protected void startMonitor()
public void stop()
protected void stopMonitor()
Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.