01: /*
02: * $Id: LifecycleManager.java 10489 2008-01-23 17:53:38Z dfeist $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
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: Set getLifecycles();
24:
25: void setLifecycles(Set lifecycles);
26:
27: void registerLifecycle(LifecyclePhase lci);
28:
29: void firePhase(MuleContext muleContext, String phase)
30: 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)
41: throws MuleException;
42:
43: void checkPhase(String name) throws IllegalStateException;
44: }
|