org.apache.servicemix.jbi.monitoring
Class StatisticsService

java.lang.Object
  extended by org.apache.servicemix.jbi.management.BaseLifeCycle
      extended by org.apache.servicemix.jbi.management.BaseSystemService
          extended by org.apache.servicemix.jbi.monitoring.StatisticsService
All Implemented Interfaces:
javax.jbi.management.LifeCycleMBean, MBeanInfoProvider, StatisticsServiceMBean

public class StatisticsService
extends BaseSystemService
implements StatisticsServiceMBean

Author:
gnodet

Field Summary
 
Fields inherited from class org.apache.servicemix.jbi.management.BaseSystemService
container
 
Fields inherited from class org.apache.servicemix.jbi.management.BaseLifeCycle
currentState, INITIALIZED, listener
 
Fields inherited from interface javax.jbi.management.LifeCycleMBean
SHUTDOWN, STARTED, STOPPED, UNKNOWN
 
Constructor Summary
StatisticsService()
           
 
Method Summary
protected  void doDumpStats()
           
 MBeanAttributeInfo[] getAttributeInfos()
          Get an array of MBeanAttributeInfo
 String getDescription()
          Get the Description of the item
 MBeanOperationInfo[] getOperationInfos()
          Get an array of MBeanOperationInfo
protected  Class<StatisticsServiceMBean> getServiceMBean()
           
 long getStatsInterval()
           
 void init(JBIContainer container)
           
 boolean isDumpStats()
           
protected  void onComponentInitialized(ComponentEvent event)
           
protected  void onComponentShutDown(ComponentEvent event)
           
protected  void onEndpointRegistered(EndpointEvent event)
           
protected  void onEndpointUnregistered(EndpointEvent event)
           
protected  void onExchangeAccepted(ExchangeEvent event)
           
protected  void onExchangeSent(ExchangeEvent event)
           
 void resetAllStats()
          Reset all statistics
protected  void scheduleStatsTimer()
           
 void setDumpStats(boolean value)
           
 void setStatsInterval(long statsInterval)
           
 void start()
          Start the item.
 void stop()
          Stop the item.
 
Methods inherited from class org.apache.servicemix.jbi.management.BaseSystemService
getContainer, getName, getType, shutDown
 
Methods inherited from class org.apache.servicemix.jbi.management.BaseLifeCycle
firePropertyChanged, getCurrentState, getObjectToManage, getSubType, init, isInitialized, isShutDown, isStarted, isStopped, isUnknown, setCurrentState, setPropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatisticsService

public StatisticsService()
Method Detail

getStatsInterval

public long getStatsInterval()
Specified by:
getStatsInterval in interface StatisticsServiceMBean
Returns:
the statsInterval

setStatsInterval

public void setStatsInterval(long statsInterval)
Specified by:
setStatsInterval in interface StatisticsServiceMBean
Parameters:
statsInterval - the statsInterval to set

isDumpStats

public boolean isDumpStats()
Specified by:
isDumpStats in interface StatisticsServiceMBean
Returns:
the dumpStats

setDumpStats

public void setDumpStats(boolean value)
Specified by:
setDumpStats in interface StatisticsServiceMBean
Parameters:
dumpStats - the dumpStats to set

getServiceMBean

protected Class<StatisticsServiceMBean> getServiceMBean()
Specified by:
getServiceMBean in class BaseSystemService

getDescription

public String getDescription()
Description copied from interface: MBeanInfoProvider
Get the Description of the item

Specified by:
getDescription in interface MBeanInfoProvider
Returns:
the description

resetAllStats

public void resetAllStats()
Description copied from interface: StatisticsServiceMBean
Reset all statistics

Specified by:
resetAllStats in interface StatisticsServiceMBean

start

public void start()
           throws javax.jbi.JBIException
Description copied from class: BaseLifeCycle
Start the item.

Specified by:
start in interface javax.jbi.management.LifeCycleMBean
Overrides:
start in class BaseLifeCycle
Throws:
javax.jbi.JBIException - if the item fails to start.

stop

public void stop()
          throws javax.jbi.JBIException
Description copied from class: BaseLifeCycle
Stop the item. This suspends current messaging activities.

Specified by:
stop in interface javax.jbi.management.LifeCycleMBean
Overrides:
stop in class BaseLifeCycle
Throws:
javax.jbi.JBIException - if the item fails to stop.

init

public void init(JBIContainer container)
          throws javax.jbi.JBIException
Overrides:
init in class BaseSystemService
Throws:
javax.jbi.JBIException

onComponentInitialized

protected void onComponentInitialized(ComponentEvent event)

onComponentShutDown

protected void onComponentShutDown(ComponentEvent event)

onEndpointRegistered

protected void onEndpointRegistered(EndpointEvent event)

onEndpointUnregistered

protected void onEndpointUnregistered(EndpointEvent event)

onExchangeSent

protected void onExchangeSent(ExchangeEvent event)

onExchangeAccepted

protected void onExchangeAccepted(ExchangeEvent event)

scheduleStatsTimer

protected void scheduleStatsTimer()

doDumpStats

protected void doDumpStats()

getAttributeInfos

public MBeanAttributeInfo[] getAttributeInfos()
                                       throws JMException
Get an array of MBeanAttributeInfo

Specified by:
getAttributeInfos in interface MBeanInfoProvider
Overrides:
getAttributeInfos in class BaseLifeCycle
Returns:
array of AttributeInfos
Throws:
JMException

getOperationInfos

public MBeanOperationInfo[] getOperationInfos()
                                       throws JMException
Get an array of MBeanOperationInfo

Specified by:
getOperationInfos in interface MBeanInfoProvider
Overrides:
getOperationInfos in class BaseLifeCycle
Returns:
array of OperationInfos
Throws:
JMException


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.