Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
DefaultLifecycleManager |
|
| 1.0;1 |
1 | /* | |
2 | * $Id: DefaultLifecycleManager.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.lifecycle; | |
11 | ||
12 | import org.mule.api.MuleContext; | |
13 | import org.mule.api.lifecycle.Initialisable; | |
14 | import org.mule.api.lifecycle.Startable; | |
15 | import org.mule.api.lifecycle.Stoppable; | |
16 | import org.mule.api.registry.Registry; | |
17 | import org.mule.lifecycle.phases.MuleContextStartPhase; | |
18 | import org.mule.lifecycle.phases.MuleContextStopPhase; | |
19 | import org.mule.lifecycle.phases.TransientRegistryDisposePhase; | |
20 | import org.mule.lifecycle.phases.TransientRegistryInitialisePhase; | |
21 | ||
22 | /** | |
23 | * Creates the default Mule lifecycleManager with {@link Initialisable#initialise()}, {@link Startable#start()}, | |
24 | * {@link Stoppable#stop()} and {@link org.mule.api.lifecycle.Disposable#dispose()}. | |
25 | * | |
26 | * @see org.mule.api.lifecycle.Initialisable | |
27 | * @see org.mule.api.lifecycle.Startable | |
28 | * @see org.mule.api.lifecycle.Stoppable | |
29 | * @see org.mule.api.lifecycle.Disposable | |
30 | */ | |
31 | public class DefaultLifecycleManager extends GenericLifecycleManager | |
32 | { | |
33 | public DefaultLifecycleManager() | |
34 | 0 | { |
35 | //Create Lifecycle phases | |
36 | 0 | Class[] ignorredObjects = new Class[]{Registry.class, MuleContext.class}; |
37 | ||
38 | 0 | registerLifecycle(new TransientRegistryInitialisePhase(ignorredObjects)); |
39 | 0 | registerLifecycle(new MuleContextStartPhase(ignorredObjects)); |
40 | 0 | registerLifecycle(new MuleContextStopPhase(ignorredObjects)); |
41 | 0 | registerLifecycle(new TransientRegistryDisposePhase(ignorredObjects)); |
42 | 0 | } |
43 | } |