org.ow2.petals.jmx
Class SystemMonitoringServiceClient

java.lang.Object
  extended by org.ow2.petals.jmx.AbstractServiceClient
      extended by org.ow2.petals.jmx.SystemMonitoringServiceClient

public class SystemMonitoringServiceClient
extends AbstractServiceClient

Client API of the JMX System Monitoring service.

Author:
mcarpentier - EBM Websourcing

Field Summary
protected static java.lang.String AVAILABLE_PROCESSORS
          Attributes for OS MBean : some attributes are platform specific
protected static java.lang.String COMMITTED_VIRTUAL_MEMORY_SIZE
           
protected static java.lang.String DAEMON_THREAD_COUNT
           
protected static java.lang.String FREE_PHYSICAL_MEMORY_SIZE
           
protected static java.lang.String HEAP_MEMORY_USAGE
          Attributes for Memory MBean
protected static java.lang.String LOADED_CLASS_COUNT
          Attributes for ClassLoading MBean
protected static java.lang.String OBJECT_PENDING_FINALIZATION_COUNT
           
protected static java.lang.String PEAK_THREAD_COUNT
          Attributes for Threading MBean
protected static java.lang.String PROCESS_CPU_TIME
           
protected static java.lang.String THREAD_COUNT
           
protected static java.lang.String TOTAL_LOADED_CLASS_COUNT
           
protected static java.lang.String TOTAL_PHYSICAL_MEMORY_SIZE
           
protected static java.lang.String TOTAL_STARTED_THREAD_COUNT
           
protected static java.lang.String UNLOADED_CLASS_COUNT
           
protected static java.lang.String UP_TIME
          Attributes for Runtime MBean
 
Fields inherited from class org.ow2.petals.jmx.AbstractServiceClient
JMX_FIELD_NAME, JMX_FIELD_TYPE, JMX_SERVICE_TYPE, mbeanName, mBeanServerConnection, petalsDomain
 
Constructor Summary
SystemMonitoringServiceClient(java.lang.String domain, javax.management.MBeanServerConnection beanServerConnection)
          Creates a new instance of SystemMonitoringServiceClient Check if all needed beans exists
 
Method Summary
 int getAvailableProcessors()
          Get the available processors
 long getCommittedVirtualMemorySize()
          Get the committed physical memory size
 int getDaemonThreadCount()
          Get Daemon thread count
 long getFreePhysicalMemorySize()
          Get the free physical memory size
 javax.management.openmbean.CompositeDataSupport getHeapMemoryUsage()
          Get heap memory usage
 int getLoadedClassCount()
          Get the loaded class count
 int getPeakThreadCount()
          Get Peak thread count
 int getPendingObjects()
          Get heap memory usage
 long getProcessCpuTime()
          Get the process cpu time
 int getThreadCount()
          Get thread count
 long getTotalLoadedClassCount()
          Get the total loaded class count
 long getTotalPhysicalMemorySize()
          Get the total physical mem size
 long getTotalStartedThreadCount()
          Get the total started thread count
 long getUnloadedClassCount()
          Get the unloaded class count
 long getUptime()
          Get the up time
 
Methods inherited from class org.ow2.petals.jmx.AbstractServiceClient
getAttribute, getAttribute, performAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOADED_CLASS_COUNT

protected static final java.lang.String LOADED_CLASS_COUNT
Attributes for ClassLoading MBean

See Also:
Constant Field Values

TOTAL_LOADED_CLASS_COUNT

protected static final java.lang.String TOTAL_LOADED_CLASS_COUNT
See Also:
Constant Field Values

UNLOADED_CLASS_COUNT

protected static final java.lang.String UNLOADED_CLASS_COUNT
See Also:
Constant Field Values

UP_TIME

protected static final java.lang.String UP_TIME
Attributes for Runtime MBean

See Also:
Constant Field Values

PEAK_THREAD_COUNT

protected static final java.lang.String PEAK_THREAD_COUNT
Attributes for Threading MBean

See Also:
Constant Field Values

DAEMON_THREAD_COUNT

protected static final java.lang.String DAEMON_THREAD_COUNT
See Also:
Constant Field Values

THREAD_COUNT

protected static final java.lang.String THREAD_COUNT
See Also:
Constant Field Values

TOTAL_STARTED_THREAD_COUNT

protected static final java.lang.String TOTAL_STARTED_THREAD_COUNT
See Also:
Constant Field Values

HEAP_MEMORY_USAGE

protected static final java.lang.String HEAP_MEMORY_USAGE
Attributes for Memory MBean

See Also:
Constant Field Values

OBJECT_PENDING_FINALIZATION_COUNT

protected static final java.lang.String OBJECT_PENDING_FINALIZATION_COUNT
See Also:
Constant Field Values

AVAILABLE_PROCESSORS

protected static final java.lang.String AVAILABLE_PROCESSORS
Attributes for OS MBean : some attributes are platform specific

See Also:
Constant Field Values

PROCESS_CPU_TIME

protected static final java.lang.String PROCESS_CPU_TIME
See Also:
Constant Field Values

TOTAL_PHYSICAL_MEMORY_SIZE

protected static final java.lang.String TOTAL_PHYSICAL_MEMORY_SIZE
See Also:
Constant Field Values

FREE_PHYSICAL_MEMORY_SIZE

protected static final java.lang.String FREE_PHYSICAL_MEMORY_SIZE
See Also:
Constant Field Values

COMMITTED_VIRTUAL_MEMORY_SIZE

protected static final java.lang.String COMMITTED_VIRTUAL_MEMORY_SIZE
See Also:
Constant Field Values
Constructor Detail

SystemMonitoringServiceClient

public SystemMonitoringServiceClient(java.lang.String domain,
                                     javax.management.MBeanServerConnection beanServerConnection)
                              throws SystemMonitoringDoesNotExistException,
                                     SystemMonitoringServiceErrorException
Creates a new instance of SystemMonitoringServiceClient Check if all needed beans exists

Parameters:
domain -
beanServerConnection -
Throws:
SystemMonitoringDoesNotExistException - if a needed bean does not exists
SystemMonitoringServiceErrorException
Method Detail

getHeapMemoryUsage

public javax.management.openmbean.CompositeDataSupport getHeapMemoryUsage()
                                                                   throws PerformActionErrorException
Get heap memory usage

Throws:
PerformActionErrorException

getPendingObjects

public int getPendingObjects()
                      throws PerformActionErrorException
Get heap memory usage

Throws:
PerformActionErrorException

getPeakThreadCount

public int getPeakThreadCount()
                       throws PerformActionErrorException
Get Peak thread count

Throws:
PerformActionErrorException

getDaemonThreadCount

public int getDaemonThreadCount()
                         throws PerformActionErrorException
Get Daemon thread count

Throws:
PerformActionErrorException

getThreadCount

public int getThreadCount()
                   throws PerformActionErrorException
Get thread count

Throws:
PerformActionErrorException

getTotalStartedThreadCount

public long getTotalStartedThreadCount()
                                throws PerformActionErrorException
Get the total started thread count

Throws:
PerformActionErrorException

getAvailableProcessors

public int getAvailableProcessors()
                           throws PerformActionErrorException
Get the available processors

Throws:
PerformActionErrorException

getUptime

public long getUptime()
               throws PerformActionErrorException
Get the up time

Throws:
PerformActionErrorException

getLoadedClassCount

public int getLoadedClassCount()
                        throws PerformActionErrorException
Get the loaded class count

Throws:
PerformActionErrorException

getTotalLoadedClassCount

public long getTotalLoadedClassCount()
                              throws PerformActionErrorException
Get the total loaded class count

Throws:
PerformActionErrorException

getUnloadedClassCount

public long getUnloadedClassCount()
                           throws PerformActionErrorException
Get the unloaded class count

Throws:
PerformActionErrorException

getProcessCpuTime

public long getProcessCpuTime()
                       throws PerformActionErrorException
Get the process cpu time

Throws:
PerformActionErrorException
AttributeErrorException

getTotalPhysicalMemorySize

public long getTotalPhysicalMemorySize()
                                throws PerformActionErrorException
Get the total physical mem size

Throws:
PerformActionErrorException

getFreePhysicalMemorySize

public long getFreePhysicalMemorySize()
                               throws PerformActionErrorException
Get the free physical memory size

Throws:
PerformActionErrorException

getCommittedVirtualMemorySize

public long getCommittedVirtualMemorySize()
                                   throws PerformActionErrorException
Get the committed physical memory size

Throws:
PerformActionErrorException


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.