|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 Monitor
value
- to be monitoredMonitor.add(long)
public void clear()
clear
in interface Monitor
Monitor.clear()
public void fireMonitoringEvent(MonitoringEvent event)
MonitoringEvent
to all registred
listeners.
fireMonitoringEvent
in interface Monitor
org.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 Monitor
Monitor.getFeature(java.lang.Class)
public java.util.Set<java.lang.Class> getFeatures()
getFeatures
in interface Monitor
Monitor.getFeatures()
public java.lang.String getName()
getName
in interface Monitor
Monitor.getName()
public java.util.Set<java.lang.String> getTags()
getTags
in interface Monitor
Monitor.getTags()
public boolean hasFeatures(java.lang.Class[] features)
hasFeatures
in interface Monitor
features
- a set of requiered features
Monitor.hasFeatures(java.lang.Class[])
public boolean isFeatureSupported(java.lang.Class clazz)
isFeatureSupported
in interface Monitor
Monitor.isFeatureSupported(java.lang.Class)
public boolean isTagged(java.lang.String tag)
isTagged
in interface Monitor
tag
- 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 Monitor
tag
- the tag
Monitor.tag(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |