1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
package org.mule.lifecycle.phases; |
11 | |
|
12 | |
import org.mule.api.MuleContext; |
13 | |
import org.mule.api.agent.Agent; |
14 | |
import org.mule.api.endpoint.ImmutableEndpoint; |
15 | |
import org.mule.api.lifecycle.Disposable; |
16 | |
import org.mule.api.lifecycle.Initialisable; |
17 | |
import org.mule.api.model.Model; |
18 | |
import org.mule.api.registry.Registry; |
19 | |
import org.mule.api.service.Service; |
20 | |
import org.mule.api.transformer.Transformer; |
21 | |
import org.mule.api.transport.Connector; |
22 | |
import org.mule.lifecycle.DefaultLifecyclePhase; |
23 | |
import org.mule.lifecycle.NotificationLifecycleObject; |
24 | |
|
25 | |
import java.util.LinkedHashSet; |
26 | |
import java.util.Set; |
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
public class TransientRegistryInitialisePhase extends DefaultLifecyclePhase |
39 | |
{ |
40 | |
public TransientRegistryInitialisePhase() |
41 | |
{ |
42 | 1160 | this(new Class[]{Registry.class}); |
43 | 1160 | } |
44 | |
|
45 | |
public TransientRegistryInitialisePhase(Class[] ignorredObjects) |
46 | |
{ |
47 | 1160 | super(Initialisable.PHASE_NAME, Initialisable.class, Disposable.PHASE_NAME); |
48 | |
|
49 | 1160 | setIgnoredObjectTypes(ignorredObjects); |
50 | 1160 | Set initOrderedObjects = new LinkedHashSet(); |
51 | 1160 | initOrderedObjects.add(new NotificationLifecycleObject(MuleContext.class)); |
52 | 1160 | initOrderedObjects.add(new NotificationLifecycleObject(Connector.class)); |
53 | 1160 | initOrderedObjects.add(new NotificationLifecycleObject(Transformer.class)); |
54 | 1160 | initOrderedObjects.add(new NotificationLifecycleObject(ImmutableEndpoint.class)); |
55 | 1160 | initOrderedObjects.add(new NotificationLifecycleObject(Agent.class)); |
56 | 1160 | initOrderedObjects.add(new NotificationLifecycleObject(Service.class)); |
57 | 1160 | initOrderedObjects.add(new NotificationLifecycleObject(Model.class)); |
58 | |
|
59 | 1160 | initOrderedObjects.add(new NotificationLifecycleObject(Initialisable.class)); |
60 | |
|
61 | 1160 | setOrderedLifecycleObjects(initOrderedObjects); |
62 | 1160 | registerSupportedPhase(NotInLifecyclePhase.PHASE_NAME); |
63 | 1160 | } |
64 | |
} |