org.mule.management.mbeans
Class ComponentService

java.lang.Object
  extended by org.mule.management.mbeans.ComponentService
All Implemented Interfaces:
javax.management.MBeanRegistration, ComponentServiceMBean, ComponentStatsMBean, Startable, Stoppable

public class ComponentService
extends Object
implements ComponentServiceMBean, javax.management.MBeanRegistration, ComponentStatsMBean

ComponentService exposes service information about a Mule Managed component.


Constructor Summary
ComponentService(String name)
           
 
Method Summary
 void clearStatistics()
           
 void dispose()
           
 void forceStop()
          Causes the component to stop without processing its event queue first
 long getAsyncEventsReceived()
           
 long getAsyncEventsSent()
           
 long getAverageExecutionTime()
           
 long getAverageQueueSize()
           
 long getExecutedEvents()
           
 long getExecutionErrors()
           
 long getFatalErrors()
           
 long getMaxExecutionTime()
           
 long getMaxQueueSize()
           
 long getMinExecutionTime()
           
 String getName()
          The name of this component
 long getQueuedEvents()
           
 int getQueueSize()
          The number of queued events for this component
 long getReplyToEventsSent()
           
 javax.management.ObjectName getStatistics()
          The statistics for this component
 long getSyncEventsReceived()
           
 long getSyncEventsSent()
           
 long getTotalEventsReceived()
           
 long getTotalEventsSent()
           
 long getTotalExecutionTime()
           
 boolean isPaused()
           
 boolean isStopped()
           
 boolean isStopping()
           
 void pause()
          Pauses event processing for theComponent.
 void postDeregister()
           
 void postRegister(Boolean registrationDone)
           
 void preDeregister()
           
 javax.management.ObjectName preRegister(javax.management.MBeanServer server, javax.management.ObjectName name)
           
 void resume()
          Resumes the Component that has been paused.
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentService

public ComponentService(String name)
Method Detail

getQueueSize

public int getQueueSize()
Description copied from interface: ComponentServiceMBean
The number of queued events for this component

Specified by:
getQueueSize in interface ComponentServiceMBean
Returns:
The number of queued events for this component

pause

public void pause()
           throws UMOException
Pauses event processing for theComponent. Unlike stop(), a paused component will still consume messages from the underlying transport, but those messages will be queued until the component is resumed.

In order to persist these queued messages you can set the 'recoverableMode' property on the Muleconfiguration to true. this causes all internal queues to store their state.

Specified by:
pause in interface ComponentServiceMBean
Throws:
UMOException - if the component failed to pause.
See Also:
MuleConfiguration

resume

public void resume()
            throws UMOException
Resumes the Component that has been paused. If the component is not paused nothing is executed.

Specified by:
resume in interface ComponentServiceMBean
Throws:
UMOException - if the component failed to resume

isPaused

public boolean isPaused()
Specified by:
isPaused in interface ComponentServiceMBean

isStopped

public boolean isStopped()
Specified by:
isStopped in interface ComponentServiceMBean

stop

public void stop()
          throws UMOException
Specified by:
stop in interface Stoppable
Throws:
UMOException

forceStop

public void forceStop()
               throws UMOException
Description copied from interface: ComponentServiceMBean
Causes the component to stop without processing its event queue first

Specified by:
forceStop in interface ComponentServiceMBean
Throws:
UMOException

isStopping

public boolean isStopping()
Specified by:
isStopping in interface ComponentServiceMBean

dispose

public void dispose()
             throws UMOException
Specified by:
dispose in interface ComponentServiceMBean
Throws:
UMOException

start

public void start()
           throws UMOException
Specified by:
start in interface Startable
Throws:
UMOException

getStatistics

public javax.management.ObjectName getStatistics()
Description copied from interface: ComponentServiceMBean
The statistics for this component

Specified by:
getStatistics in interface ComponentServiceMBean
Returns:
statistics for this component
See Also:
ComponentStats

preRegister

public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
                                               javax.management.ObjectName name)
                                        throws Exception
Specified by:
preRegister in interface javax.management.MBeanRegistration
Throws:
Exception

postRegister

public void postRegister(Boolean registrationDone)
Specified by:
postRegister in interface javax.management.MBeanRegistration

preDeregister

public void preDeregister()
                   throws Exception
Specified by:
preDeregister in interface javax.management.MBeanRegistration
Throws:
Exception

postDeregister

public void postDeregister()
Specified by:
postDeregister in interface javax.management.MBeanRegistration

clearStatistics

public void clearStatistics()
Specified by:
clearStatistics in interface ComponentStatsMBean

getAsyncEventsReceived

public long getAsyncEventsReceived()
Specified by:
getAsyncEventsReceived in interface ComponentStatsMBean
Returns:

getAsyncEventsSent

public long getAsyncEventsSent()
Specified by:
getAsyncEventsSent in interface ComponentStatsMBean
Returns:

getAverageExecutionTime

public long getAverageExecutionTime()
Specified by:
getAverageExecutionTime in interface ComponentStatsMBean
Returns:

getAverageQueueSize

public long getAverageQueueSize()
Specified by:
getAverageQueueSize in interface ComponentStatsMBean
Returns:

getExecutedEvents

public long getExecutedEvents()
Specified by:
getExecutedEvents in interface ComponentStatsMBean
Returns:

getExecutionErrors

public long getExecutionErrors()
Specified by:
getExecutionErrors in interface ComponentStatsMBean
Returns:

getFatalErrors

public long getFatalErrors()
Specified by:
getFatalErrors in interface ComponentStatsMBean
Returns:

getMaxExecutionTime

public long getMaxExecutionTime()
Specified by:
getMaxExecutionTime in interface ComponentStatsMBean
Returns:

getMaxQueueSize

public long getMaxQueueSize()
Specified by:
getMaxQueueSize in interface ComponentStatsMBean
Returns:

getMinExecutionTime

public long getMinExecutionTime()
Specified by:
getMinExecutionTime in interface ComponentStatsMBean
Returns:

getName

public String getName()
Description copied from interface: ComponentServiceMBean
The name of this component

Specified by:
getName in interface ComponentServiceMBean
Returns:

getQueuedEvents

public long getQueuedEvents()
Specified by:
getQueuedEvents in interface ComponentStatsMBean
Returns:

getReplyToEventsSent

public long getReplyToEventsSent()
Specified by:
getReplyToEventsSent in interface ComponentStatsMBean
Returns:

getSyncEventsReceived

public long getSyncEventsReceived()
Specified by:
getSyncEventsReceived in interface ComponentStatsMBean
Returns:

getSyncEventsSent

public long getSyncEventsSent()
Specified by:
getSyncEventsSent in interface ComponentStatsMBean
Returns:

getTotalEventsReceived

public long getTotalEventsReceived()
Specified by:
getTotalEventsReceived in interface ComponentStatsMBean
Returns:

getTotalEventsSent

public long getTotalEventsSent()
Specified by:
getTotalEventsSent in interface ComponentStatsMBean
Returns:

getTotalExecutionTime

public long getTotalExecutionTime()
Specified by:
getTotalExecutionTime in interface ComponentStatsMBean
Returns:


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.