public class JmxMonitor extends Object implements Runnable
JmxMonitorListener| Modifier and Type | Field and Description |
|---|---|
static String |
FormatterListener |
static String |
SamplingInterval |
| Constructor and Description |
|---|
JmxMonitor() |
| Modifier and Type | Method and Description |
|---|---|
void |
addJmxMonitorListener(JmxMonitorListener listener)
Registers custom
JmxMonitorListener |
protected ServiceMetrics[] |
collectStats(boolean initial,
long uptime) |
void |
doStop() |
int |
getMaxServiceNameLength() |
protected int |
getServiceCount() |
void |
initialize(String remoteServerURI,
long samplingInterval)
Connects to a remote JMX server identified by given
remoteServerURI. |
boolean |
isRunning() |
boolean |
isVerbose() |
static void |
main(String[] args) |
void |
notifyListeners(long uptime,
ServiceMetrics[] metrics)
Passes metrics to all registered
JmxMonitorListener objects |
void |
run()
Retrieves metrics from UIMA-AS MBeans at defined interval.
|
void |
setVerbose() |
public static final String SamplingInterval
public static final String FormatterListener
public void addJmxMonitorListener(JmxMonitorListener listener)
JmxMonitorListenerlistener - - listener to receive metrics for formattingpublic void notifyListeners(long uptime,
ServiceMetrics[] metrics)
JmxMonitorListener objectsuptime - - time when the metrics were collectedmetrics - - current metricspublic boolean isVerbose()
public void setVerbose()
public int getMaxServiceNameLength()
public void initialize(String remoteServerURI, long samplingInterval) throws Exception
remoteServerURI. Creates
proxies for all UIMA AS ServicePerformance MBeans found in the JMX server registry. If UIMA AS
service MBean indicates a remote service, this method connects to a remote Broker and creates a
proxy to an input queue for that service.remoteServerURI - samplingInterval - Exceptionprotected int getServiceCount()
protected ServiceMetrics[] collectStats(boolean initial, long uptime)
public void run()
public boolean isRunning()
public void doStop()
Copyright © 2016. All rights reserved.