my.avalon.jmx.tools
Class SystemInfo
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
my.avalon.jmx.tools.SystemInfo
- All Implemented Interfaces:
- org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.logger.LogEnabled, MBeanable, SystemInfoMBean
- public class SystemInfo
- extends org.apache.avalon.framework.logger.AbstractLogEnabled
- implements org.apache.avalon.framework.activity.Initializable, SystemInfoMBean, MBeanable
This Component provide System and Runtime information as MBean.
Useness for monitoring.
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SystemInfo
public SystemInfo()
initialize
public void initialize()
throws java.lang.Exception
- Specified by:
initialize
in interface org.apache.avalon.framework.activity.Initializable
- Throws:
java.lang.Exception
getName
public java.lang.String getName()
- Description copied from interface:
MBeanable
- name used to (un)register the component, must be constant through the 2 calls.
- Specified by:
getName
in interface MBeanable
- Returns:
- the name of the component into "jmx-server".
getFreeMemory
public long getFreeMemory()
throws java.lang.Exception
- Specified by:
getFreeMemory
in interface SystemInfoMBean
- Throws:
java.lang.Exception
getTotalMemory
public long getTotalMemory()
throws java.lang.Exception
- Specified by:
getTotalMemory
in interface SystemInfoMBean
- Throws:
java.lang.Exception
getRatioMemory
public int getRatioMemory()
throws java.lang.Exception
- Specified by:
getRatioMemory
in interface SystemInfoMBean
- Throws:
java.lang.Exception
gc
public void gc(int status)
throws java.lang.Exception
- Specified by:
gc
in interface SystemInfoMBean
- Throws:
java.lang.Exception
exit
public void exit(int status)
throws java.lang.Exception
- Specified by:
exit
in interface SystemInfoMBean
- Throws:
java.lang.Exception
traceInstructions
public void traceInstructions(boolean on)
throws java.lang.Exception
- Specified by:
traceInstructions
in interface SystemInfoMBean
- Throws:
java.lang.Exception
traceMethodCalls
public void traceMethodCalls(boolean on)
throws java.lang.Exception
- Specified by:
traceMethodCalls
in interface SystemInfoMBean
- Throws:
java.lang.Exception
showProperties
public java.util.Properties showProperties()
throws java.lang.Exception
- Specified by:
showProperties
in interface SystemInfoMBean
- Throws:
java.lang.Exception
getProperty
public java.lang.String getProperty(java.lang.String key)
throws java.lang.Exception
- Specified by:
getProperty
in interface SystemInfoMBean
- Throws:
java.lang.Exception
getNumberOfActiveThreads
public int getNumberOfActiveThreads()
throws java.lang.Exception
- Specified by:
getNumberOfActiveThreads
in interface SystemInfoMBean
- Throws:
java.lang.Exception
Copyright © 2003-2004 . All Rights Reserved.