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.registry.Registry; |
15 | |
|
16 | |
import java.util.ArrayList; |
17 | |
import java.util.Collection; |
18 | |
import java.util.List; |
19 | |
|
20 | |
public class DefaultRegistryBroker extends AbstractRegistryBroker |
21 | |
{ |
22 | |
private TransientRegistry transientRegistry; |
23 | 0 | private List<Registry> registries = new ArrayList<Registry>(); |
24 | |
|
25 | |
public DefaultRegistryBroker(MuleContext context) |
26 | 0 | { |
27 | 0 | transientRegistry = new TransientRegistry(context); |
28 | 0 | registries.add(0, transientRegistry); |
29 | 0 | } |
30 | |
|
31 | |
TransientRegistry getTransientRegistry() |
32 | |
{ |
33 | 0 | return transientRegistry; |
34 | |
} |
35 | |
|
36 | |
public void addRegistry(Registry registry) |
37 | |
{ |
38 | 0 | registries.add(1, registry); |
39 | 0 | } |
40 | |
|
41 | |
public void removeRegistry(Registry registry) |
42 | |
{ |
43 | 0 | registries.remove(registry); |
44 | 0 | } |
45 | |
|
46 | |
protected Collection<Registry> getRegistries() |
47 | |
{ |
48 | 0 | return registries; |
49 | |
} |
50 | |
} |