public final class JmxMonitorRegistry extends java.lang.Object implements MonitorRegistry
MonitorMBean. The ObjectName
used for each monitor depends on the implementation of ObjectNameMapper
that is specified for the registry. See ObjectNameMapper.DEFAULT for
the default naming implementation.| Constructor and Description |
|---|
JmxMonitorRegistry(java.lang.String name)
Creates a new instance that registers metrics with the local mbean
server using the default ObjectNameMapper
ObjectNameMapper.DEFAULT. |
JmxMonitorRegistry(java.lang.String name,
ObjectNameMapper mapper)
Creates a new instance that registers metrics with the local mbean
server using the ObjectNameMapper provided.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<Monitor<?>> |
getRegisteredMonitors()
The set of registered Monitor objects.
|
void |
register(Monitor<?> monitor)
Register a new monitor in the registry.
|
void |
unregister(Monitor<?> monitor)
Unregister a Monitor from the registry.
|
public JmxMonitorRegistry(java.lang.String name)
ObjectNameMapper.DEFAULT.name - the registry namepublic JmxMonitorRegistry(java.lang.String name,
ObjectNameMapper mapper)
name - the registry namemapper - the monitor to object name mapperpublic java.util.Collection<Monitor<?>> getRegisteredMonitors()
getRegisteredMonitors in interface MonitorRegistrypublic void register(Monitor<?> monitor)
register in interface MonitorRegistrypublic void unregister(Monitor<?> monitor)
unregister in interface MonitorRegistry