1 /* 2 * $Id: ComponentServiceMBean.java 7963 2007-08-21 08:53:15Z dirk.olmes $ 3 * -------------------------------------------------------------------------------------- 4 * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.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.management.mbeans; 12 13 import org.mule.umo.UMOException; 14 import org.mule.umo.lifecycle.Startable; 15 import org.mule.umo.lifecycle.Stoppable; 16 17 import javax.management.ObjectName; 18 19 /** 20 * <code>ComponentServiceMBean</code> defines the management interface for a mule 21 * managed component. 22 */ 23 public interface ComponentServiceMBean extends Stoppable, Startable, ComponentStatsMBean 24 { 25 /** 26 * The statistics for this component 27 * 28 * @return statistics for this component 29 * @see ComponentStats 30 */ 31 ObjectName getStatistics(); 32 33 /** 34 * The name of this component 35 * 36 * @return The name of this component 37 */ 38 String getName(); 39 40 /** 41 * The number of queued events for this component 42 * 43 * @return The number of queued events for this component 44 */ 45 int getQueueSize(); 46 47 /** 48 * Pauses event processing for theComponent. Unlike stop(), a paused component 49 * will still consume messages from the underlying transport, but those messages 50 * will be queued until the component is resumed. In order to persist these 51 * queued messages you can set the 'recoverableMode' property on the 52 * Muleconfiguration to true. this causes all internal queues to store their 53 * state. 54 * 55 * @throws UMOException if the component failed to pause. 56 * @see org.mule.config.MuleConfiguration 57 */ 58 void pause() throws UMOException; 59 60 /** 61 * Resumes the Component that has been paused. If the component is not paused 62 * nothing is executed. 63 * 64 * @throws UMOException if the component failed to resume 65 */ 66 void resume() throws UMOException; 67 68 boolean isPaused(); 69 70 boolean isStopped(); 71 72 void dispose() throws UMOException; 73 74 /** 75 * Causes the component to stop without processing its event queue first 76 */ 77 void forceStop() throws UMOException; 78 79 boolean isStopping(); 80 }