de.intarsys.tools.monitor.MonitorTools Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of isrt Show documentation
Show all versions of isrt Show documentation
The basic runtime tools and interfaces for intarsys components.
package de.intarsys.tools.monitor;
public class MonitorTools {
/**
* Create a default IMonitor.
*
* @param id
* The id of the monitor to create.
*
* @return A default IMonitor.
*/
static protected IMonitor createDefaultMonitor(String id) {
return new NullMonitor(id);
}
static public synchronized IMonitor getMonitor(String id) {
IMonitor result = MonitorRegistry.get().lookupMonitor(id);
if (result == null) {
result = createDefaultMonitor(id);
MonitorRegistry.get().registerMonitor(result);
}
return result;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy