View Javadoc

1   /*
2    * $Id: LifecycleStateEnabled.java 20813 2010-12-21 11:37:48Z dirk.olmes $
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  package org.mule.api.lifecycle;
11  
12  import org.mule.api.service.Service;
13  import org.mule.api.transport.Connector;
14  
15  /**
16   * Objects that have an associated lifecycle manager such as {@link Service} or
17   * {@link Connector} should implement this interface so that the registry lifecycle
18   * manager can introspect the lifecycle state of an object. This allows objects to
19   * have a different lifecycle state to the registry. Typically objects that have
20   * their own lifecycle manager can be controlled externally through JMX which means
21   * there is no guarantee that the state of the object is in the same lifecycle state
22   * of the registry, hence the need to introspect the lifecycle state of an object.
23   *
24   * @since 3.0
25   */
26  public interface LifecycleStateEnabled
27  {
28      LifecycleState getLifecycleState();
29  }