View Javadoc

1   /*
2    * $Id: LifecycleManager.java 10489 2008-01-23 17:53:38Z dfeist $
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  package org.mule.api.lifecycle;
11  
12  import org.mule.api.MuleException;
13  import org.mule.api.MuleContext;
14  
15  import java.util.Set;
16  
17  /**
18   * The LifecycleManager is responsible for managing the different lifecycle phases of the server and managing the
19   * transitions between lifecycle phases.
20   */
21  
22  public interface LifecycleManager
23  {
24      Set getLifecycles();
25  
26      void setLifecycles(Set lifecycles);
27  
28      void registerLifecycle(LifecyclePhase lci);
29  
30      void firePhase(MuleContext muleContext, String phase) throws MuleException;
31  
32      String getCurrentPhase();
33  
34      String getExecutingPhase();
35  
36      void reset();
37  
38      boolean isPhaseComplete(String phaseName);
39  
40      void applyLifecycle(MuleContext muleContext, Object object) throws MuleException;
41  
42      void checkPhase(String name) throws IllegalStateException;
43  }