org.mule.module.management.mbean
Class ServiceService

java.lang.Object
  extended by org.mule.module.management.mbean.ServiceService
All Implemented Interfaces:
javax.management.MBeanRegistration, Startable, Stoppable, ServiceServiceMBean, ServiceStatsMBean

public class ServiceService
extends java.lang.Object
implements ServiceServiceMBean, javax.management.MBeanRegistration, ServiceStatsMBean

ServiceService exposes service information about a Mule Managed service.


Field Summary
 
Fields inherited from interface org.mule.module.management.mbean.ServiceServiceMBean
DEFAULT_JMX_NAME_PREFIX
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Constructor Summary
ServiceService(java.lang.String name, MuleContext muleContext)
           
 
Method Summary
 void clearStatistics()
           
 void dispose()
           
 void forceStop()
          Causes the service 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()
           
 java.lang.String getName()
          The name of this service
 long getQueuedEvents()
           
 int getQueueSize()
          The number of queued events for this service
 long getReplyToEventsSent()
           
 javax.management.ObjectName getStatistics()
          The statistics for this service
 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(java.lang.Boolean registrationDone)
           
 void preDeregister()
           
 javax.management.ObjectName preRegister(javax.management.MBeanServer server, javax.management.ObjectName name)
           
 void resume()
          Resumes the Service 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

ServiceService

public ServiceService(java.lang.String name,
                      MuleContext muleContext)
Method Detail

getQueueSize

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

Specified by:
getQueueSize in interface ServiceServiceMBean
Returns:
The number of queued events for this service

pause

public void pause()
           throws MuleException
Pauses event processing for theComponent. Unlike stop(), a paused service will still consume messages from the underlying transport, but those messages will be queued until the service 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 ServiceServiceMBean
Throws:
MuleException - if the service failed to pause.
See Also:
MuleConfiguration

resume

public void resume()
            throws MuleException
Resumes the Service that has been paused. If the service is not paused nothing is executed.

Specified by:
resume in interface ServiceServiceMBean
Throws:
MuleException - if the service failed to resume

isPaused

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

isStopped

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

stop

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

forceStop

public void forceStop()
               throws MuleException
Description copied from interface: ServiceServiceMBean
Causes the service to stop without processing its event queue first

Specified by:
forceStop in interface ServiceServiceMBean
Throws:
MuleException

isStopping

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

dispose

public void dispose()
             throws MuleException
Specified by:
dispose in interface ServiceServiceMBean
Throws:
MuleException

start

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

getStatistics

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

Specified by:
getStatistics in interface ServiceServiceMBean
Returns:
statistics for this service
See Also:
ServiceStats

preRegister

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

postRegister

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

preDeregister

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

postDeregister

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

clearStatistics

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

getAsyncEventsReceived

public long getAsyncEventsReceived()
Specified by:
getAsyncEventsReceived in interface ServiceStatsMBean

getAsyncEventsSent

public long getAsyncEventsSent()
Specified by:
getAsyncEventsSent in interface ServiceStatsMBean

getAverageExecutionTime

public long getAverageExecutionTime()
Specified by:
getAverageExecutionTime in interface ServiceStatsMBean

getAverageQueueSize

public long getAverageQueueSize()
Specified by:
getAverageQueueSize in interface ServiceStatsMBean

getExecutedEvents

public long getExecutedEvents()
Specified by:
getExecutedEvents in interface ServiceStatsMBean

getExecutionErrors

public long getExecutionErrors()
Specified by:
getExecutionErrors in interface ServiceStatsMBean

getFatalErrors

public long getFatalErrors()
Specified by:
getFatalErrors in interface ServiceStatsMBean

getMaxExecutionTime

public long getMaxExecutionTime()
Specified by:
getMaxExecutionTime in interface ServiceStatsMBean

getMaxQueueSize

public long getMaxQueueSize()
Specified by:
getMaxQueueSize in interface ServiceStatsMBean

getMinExecutionTime

public long getMinExecutionTime()
Specified by:
getMinExecutionTime in interface ServiceStatsMBean

getName

public java.lang.String getName()
Description copied from interface: ServiceServiceMBean
The name of this service

Specified by:
getName in interface ServiceServiceMBean
Returns:
The name of this service

getQueuedEvents

public long getQueuedEvents()
Specified by:
getQueuedEvents in interface ServiceStatsMBean

getReplyToEventsSent

public long getReplyToEventsSent()
Specified by:
getReplyToEventsSent in interface ServiceStatsMBean

getSyncEventsReceived

public long getSyncEventsReceived()
Specified by:
getSyncEventsReceived in interface ServiceStatsMBean

getSyncEventsSent

public long getSyncEventsSent()
Specified by:
getSyncEventsSent in interface ServiceStatsMBean

getTotalEventsReceived

public long getTotalEventsReceived()
Specified by:
getTotalEventsReceived in interface ServiceStatsMBean

getTotalEventsSent

public long getTotalEventsSent()
Specified by:
getTotalEventsSent in interface ServiceStatsMBean

getTotalExecutionTime

public long getTotalExecutionTime()
Specified by:
getTotalExecutionTime in interface ServiceStatsMBean


Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.