|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jmonit.monitors.NullMonitor
public class NullMonitor
A convenience stub for testing purpose or to disable monitoring without breaking the application.
| Constructor Summary | |
|---|---|
NullMonitor(java.lang.String name)
|
|
| Method Summary | ||
|---|---|---|
void |
add(long value)
Convenience method to add a primitive numeric data to the monitor. |
|
void |
clear()
Reset the monitor |
|
void |
fireMonitoringEvent(MonitoringEvent event)
Dispatches the given MonitoringEvent to all registred
listeners. |
|
|
getFeature(java.lang.Class<T> feature)
To acces internal optional features or plugable extensions, application asks the monitor for the extension plublic API class. |
|
java.util.Set<java.lang.Class> |
getFeatures()
|
|
java.lang.String |
getName()
|
|
java.util.Set<java.lang.String> |
getTags()
|
|
boolean |
hasFeatures(java.lang.Class[] features)
|
|
boolean |
isFeatureSupported(java.lang.Class clazz)
|
|
boolean |
isTagged(java.lang.String tag)
|
|
void |
monitor(long value,
java.lang.Object context)
|
|
Monitor |
tag(java.lang.String tag)
Tag the monitor |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NullMonitor(java.lang.String name)
| Method Detail |
|---|
public void add(long value)
add in interface Monitorvalue - to be monitoredMonitor.add(long)public void clear()
clear in interface MonitorMonitor.clear()public void fireMonitoringEvent(MonitoringEvent event)
MonitoringEvent to all registred
listeners.
fireMonitoringEvent in interface Monitororg.jmonit.Monitor#fireEvent(org.jmonit.events.MonitoringEvent)public <T> T getFeature(java.lang.Class<T> feature)
The monitor is expected to "do its best" to return the expected feature,
including register new features on-demand. To check for a feature to be
supported, use Monitor.isFeatureSupported(java.lang.Class).
getFeature in interface MonitorMonitor.getFeature(java.lang.Class)public java.util.Set<java.lang.Class> getFeatures()
getFeatures in interface MonitorMonitor.getFeatures()public java.lang.String getName()
getName in interface MonitorMonitor.getName()public java.util.Set<java.lang.String> getTags()
getTags in interface MonitorMonitor.getTags()public boolean hasFeatures(java.lang.Class[] features)
hasFeatures in interface Monitorfeatures - a set of requiered features
Monitor.hasFeatures(java.lang.Class[])public boolean isFeatureSupported(java.lang.Class clazz)
isFeatureSupported in interface MonitorMonitor.isFeatureSupported(java.lang.Class)public boolean isTagged(java.lang.String tag)
isTagged in interface Monitortag - tag to test
Monitor.isTagged(java.lang.String)
public void monitor(long value,
java.lang.Object context)
org.jmonit.Monitor#monitor(long, java.lang.Object)public Monitor tag(java.lang.String tag)
tag in interface Monitortag - the tag
Monitor.tag(java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||