Package org.jpos.q2.qbean
Class SystemMonitor
- java.lang.Object
-
- org.jpos.q2.QBeanSupport
-
- org.jpos.q2.qbean.SystemMonitor
-
- All Implemented Interfaces:
java.lang.Runnable
,Configurable
,QBean
,SystemMonitorMBean
,QBeanSupportMBean
,QPersist
,Loggeable
public class SystemMonitor extends QBeanSupport implements java.lang.Runnable, SystemMonitorMBean, Loggeable
Periodically dumps Thread and memory usage- See Also:
Logger
-
-
Field Summary
-
Fields inherited from class org.jpos.q2.QBeanSupport
cfg, log, scheduledThreadPoolExecutor
-
-
Constructor Summary
Constructors Constructor Description SystemMonitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dump(java.io.PrintStream p, java.lang.String indent)
boolean
getDetailRequired()
long
getSleepTime()
void
run()
void
setConfiguration(Configuration cfg)
void
setDetailRequired(boolean detail)
void
setSleepTime(long sleepTime)
void
startService()
void
stopService()
-
Methods inherited from class org.jpos.q2.QBeanSupport
addAttr, close, createElement, destroy, destroyService, getAttrs, getAttrs, getConfiguration, getDump, getFactory, getLoader, getLoaderURLS, getLog, getLogger, getName, getPersist, getProperties, getProperty, getRealm, getScheduledThreadPoolExecutor, getServer, getState, getStateAsString, init, initService, isModified, running, setAttr, setLogger, setModified, setName, setPersist, setProperty, setRealm, setServer, setState, start, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jpos.q2.QBean
destroy, getState, getStateAsString, init, start, stop
-
Methods inherited from interface org.jpos.q2.QBeanSupportMBean
getDump, getLoader, getLoaderURLS, getLogger, getName, getRealm, getServer, setLogger, setName, setPersist, setRealm, setServer
-
Methods inherited from interface org.jpos.q2.QPersist
getPersist, isModified
-
-
-
-
Constructor Detail
-
SystemMonitor
public SystemMonitor()
-
-
Method Detail
-
startService
public void startService()
- Overrides:
startService
in classQBeanSupport
-
stopService
public void stopService()
- Overrides:
stopService
in classQBeanSupport
-
setSleepTime
public void setSleepTime(long sleepTime)
- Specified by:
setSleepTime
in interfaceSystemMonitorMBean
-
getSleepTime
public long getSleepTime()
- Specified by:
getSleepTime
in interfaceSystemMonitorMBean
-
setDetailRequired
public void setDetailRequired(boolean detail)
- Specified by:
setDetailRequired
in interfaceSystemMonitorMBean
-
getDetailRequired
public boolean getDetailRequired()
- Specified by:
getDetailRequired
in interfaceSystemMonitorMBean
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
dump
public void dump(java.io.PrintStream p, java.lang.String indent)
-
setConfiguration
public void setConfiguration(Configuration cfg) throws ConfigurationException
- Specified by:
setConfiguration
in interfaceConfigurable
- Overrides:
setConfiguration
in classQBeanSupport
- Parameters:
cfg
- Configuration object- Throws:
ConfigurationException
-
-