Coverage Report - org.mule.module.management.mbean.ServiceServiceMBean
 
Classes in this File Line Coverage Branch Coverage Complexity
ServiceServiceMBean
N/A
N/A
1
 
 1  
 /*
 2  
  * $Id: ServiceServiceMBean.java 19191 2010-08-25 21:05:23Z tcarlson $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.module.management.mbean;
 12  
 
 13  
 import org.mule.api.MuleException;
 14  
 import org.mule.api.config.MuleConfiguration;
 15  
 import org.mule.api.lifecycle.Startable;
 16  
 import org.mule.api.lifecycle.Stoppable;
 17  
 
 18  
 import javax.management.ObjectName;
 19  
 
 20  
 /**
 21  
  * <code>ServiceServiceMBean</code> defines the management interface for a mule
 22  
  * managed service.
 23  
  */
 24  
 public interface ServiceServiceMBean extends Stoppable, Startable, ServiceStatsMBean
 25  
 {
 26  
     String DEFAULT_JMX_NAME_PREFIX = "type=Service,name=";
 27  
 
 28  
     /**
 29  
      * The statistics for this service
 30  
      * 
 31  
      * @return statistics for this service
 32  
      * @see ServiceStats
 33  
      */
 34  
     ObjectName getStatistics();
 35  
 
 36  
     /**
 37  
      * The name of this service
 38  
      * 
 39  
      * @return The name of this service
 40  
      */
 41  
     String getName();
 42  
 
 43  
     /**
 44  
      * The number of queued events for this service
 45  
      * 
 46  
      * @return The number of queued events for this service
 47  
      */
 48  
     int getQueueSize();
 49  
 
 50  
     /**
 51  
      * Pauses event processing for theComponent. Unlike stop(), a paused service
 52  
      * will still consume messages from the underlying transport, but those messages
 53  
      * will be queued until the service is resumed. In order to persist these
 54  
      * queued messages you can set the 'recoverableMode' property on the
 55  
      * Muleconfiguration to true. this causes all internal queues to store their
 56  
      * state.
 57  
      * 
 58  
      * @throws MuleException if the service failed to pause.
 59  
      * @see MuleConfiguration
 60  
      */
 61  
     void pause() throws MuleException;
 62  
 
 63  
     /**
 64  
      * Resumes the Service that has been paused. If the service is not paused
 65  
      * nothing is executed.
 66  
      * 
 67  
      * @throws MuleException if the service failed to resume
 68  
      */
 69  
     void resume() throws MuleException;
 70  
 
 71  
     boolean isPaused();
 72  
 
 73  
     boolean isStopped();
 74  
 
 75  
     void dispose() throws MuleException;
 76  
 
 77  
     /**
 78  
      * Causes the service to stop without processing its event queue first
 79  
      */
 80  
     void forceStop() throws MuleException;
 81  
 
 82  
     boolean isStopping();
 83  
 }