|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.uima.aae.jmx.monitor.JmxMonitor
public class JmxMonitor
Collects metrics from UIMA-AS Service MBeans at defined intervals and passes the metrics for
formatting to the registered JmxMonitorListener
Field Summary | |
---|---|
static java.lang.String |
FormatterListener
|
static java.lang.String |
SamplingInterval
|
Constructor Summary | |
---|---|
JmxMonitor()
|
Method Summary | |
---|---|
void |
addJmxMonitorListener(JmxMonitorListener listener)
Registers custom JmxMonitorListener |
protected ServiceMetrics[] |
collectStats(boolean initial,
long uptime)
|
void |
doStop()
|
int |
getMaxServiceNameLength()
|
protected int |
getServiceCount()
|
void |
initialize(java.lang.String remoteServerURI,
long samplingInterval)
Connects to a remote JMX server identified by given remoteServerURI . |
boolean |
isRunning()
|
boolean |
isVerbose()
|
static void |
main(java.lang.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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SamplingInterval
public static final java.lang.String FormatterListener
Constructor Detail |
---|
public JmxMonitor()
Method Detail |
---|
public void addJmxMonitorListener(JmxMonitorListener listener)
JmxMonitorListener
listener
- - listener to receive metrics for formattingpublic void notifyListeners(long uptime, ServiceMetrics[] metrics)
JmxMonitorListener
objects
uptime
- - time when the metrics were collectedmetrics
- - current metricspublic boolean isVerbose()
public void setVerbose()
public int getMaxServiceNameLength()
public void initialize(java.lang.String remoteServerURI, long samplingInterval) throws java.lang.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
-
java.lang.Exception
protected int getServiceCount()
protected ServiceMetrics[] collectStats(boolean initial, long uptime)
public void run()
run
in interface java.lang.Runnable
public boolean isRunning()
public void doStop()
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |