1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.mule.registry; |
12 | |
|
13 | |
import org.mule.api.MuleContext; |
14 | |
import org.mule.api.lifecycle.LifecycleException; |
15 | |
import org.mule.api.registry.Registry; |
16 | |
|
17 | |
import java.util.ArrayList; |
18 | |
import java.util.Collection; |
19 | |
import java.util.List; |
20 | |
|
21 | |
public class DefaultRegistryBroker extends AbstractRegistryBroker |
22 | |
{ |
23 | |
private TransientRegistry transientRegistry; |
24 | 0 | private List<Registry> registries = new ArrayList<Registry>(); |
25 | |
|
26 | |
public DefaultRegistryBroker(MuleContext context) |
27 | 0 | { |
28 | 0 | transientRegistry = new TransientRegistry(context); |
29 | 0 | registries.add(0, transientRegistry); |
30 | 0 | } |
31 | |
|
32 | |
TransientRegistry getTransientRegistry() |
33 | |
{ |
34 | 0 | return transientRegistry; |
35 | |
} |
36 | |
|
37 | |
public void addRegistry(Registry registry) |
38 | |
{ |
39 | 0 | registries.add(1, registry); |
40 | 0 | } |
41 | |
|
42 | |
public void removeRegistry(Registry registry) |
43 | |
{ |
44 | 0 | registries.remove(registry); |
45 | 0 | } |
46 | |
|
47 | |
protected Collection<Registry> getRegistries() |
48 | |
{ |
49 | 0 | return registries; |
50 | |
} |
51 | |
} |