1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.mule.api.registry; |
12 | |
|
13 | |
import org.mule.api.MuleException; |
14 | |
import org.mule.api.agent.Agent; |
15 | |
import org.mule.api.endpoint.EndpointBuilder; |
16 | |
import org.mule.api.endpoint.EndpointFactory; |
17 | |
import org.mule.api.endpoint.ImmutableEndpoint; |
18 | |
import org.mule.api.lifecycle.Disposable; |
19 | |
import org.mule.api.lifecycle.Initialisable; |
20 | |
import org.mule.api.model.Model; |
21 | |
import org.mule.api.service.Service; |
22 | |
import org.mule.api.transformer.Transformer; |
23 | |
import org.mule.api.transformer.TransformerException; |
24 | |
import org.mule.api.transport.Connector; |
25 | |
|
26 | |
import java.util.Collection; |
27 | |
import java.util.List; |
28 | |
import java.util.Map; |
29 | |
import java.util.Properties; |
30 | |
|
31 | |
public interface Registry extends Initialisable, Disposable |
32 | |
{ |
33 | |
int SCOPE_IMMEDIATE = 0; |
34 | |
int SCOPE_LOCAL = 1; |
35 | |
int SCOPE_REMOTE = 2; |
36 | |
|
37 | |
int DEFAULT_SCOPE = SCOPE_REMOTE; |
38 | |
|
39 | |
|
40 | |
|
41 | |
|
42 | |
|
43 | |
|
44 | |
Object lookupObject(String key); |
45 | |
|
46 | |
|
47 | |
Object lookupObject(String key, int scope); |
48 | |
|
49 | |
|
50 | |
Collection lookupObjects(Class type); |
51 | |
|
52 | |
|
53 | |
Collection lookupObjects(Class type, int scope); |
54 | |
|
55 | |
|
56 | |
Object lookupObject(Class type) throws RegistrationException; |
57 | |
|
58 | |
|
59 | |
Object lookupObject(Class type, int scope) throws RegistrationException; |
60 | |
|
61 | |
|
62 | |
|
63 | |
Connector lookupConnector(String name); |
64 | |
|
65 | |
|
66 | |
|
67 | |
|
68 | |
|
69 | |
|
70 | |
EndpointBuilder lookupEndpointBuilder(String name); |
71 | |
|
72 | |
EndpointFactory lookupEndpointFactory(); |
73 | |
|
74 | |
Transformer lookupTransformer(String name); |
75 | |
|
76 | |
Service lookupService(String component); |
77 | |
|
78 | |
|
79 | |
|
80 | |
|
81 | |
|
82 | |
|
83 | |
|
84 | |
|
85 | |
|
86 | |
List lookupTransformers(Class input, Class output); |
87 | |
|
88 | |
|
89 | |
|
90 | |
|
91 | |
|
92 | |
|
93 | |
|
94 | |
|
95 | |
|
96 | |
Transformer lookupTransformer(Class input, Class output) throws TransformerException; |
97 | |
|
98 | |
Collection lookupServices(String model); |
99 | |
|
100 | |
Collection lookupServices(); |
101 | |
|
102 | |
Model lookupModel(String name); |
103 | |
|
104 | |
Model lookupSystemModel(); |
105 | |
|
106 | |
Agent lookupAgent(String agentName); |
107 | |
|
108 | |
|
109 | |
Collection getModels(); |
110 | |
|
111 | |
|
112 | |
Collection getConnectors(); |
113 | |
|
114 | |
|
115 | |
Collection getEndpoints(); |
116 | |
|
117 | |
|
118 | |
Collection getAgents(); |
119 | |
|
120 | |
|
121 | |
Collection getTransformers(); |
122 | |
|
123 | |
|
124 | |
|
125 | |
|
126 | |
|
127 | |
void registerObject(String key, Object value) throws RegistrationException; |
128 | |
|
129 | |
void registerObject(String key, Object value, Object metadata) throws RegistrationException; |
130 | |
|
131 | |
void registerObjects(Map objects) throws RegistrationException; |
132 | |
|
133 | |
void unregisterObject(String key) throws MuleException; |
134 | |
|
135 | |
|
136 | |
|
137 | |
|
138 | |
void registerConnector(Connector connector) throws MuleException; |
139 | |
|
140 | |
void unregisterConnector(String connectorName) throws MuleException; |
141 | |
|
142 | |
|
143 | |
void registerEndpoint(ImmutableEndpoint endpoint) throws MuleException; |
144 | |
|
145 | |
|
146 | |
void unregisterEndpoint(String endpointName) throws MuleException; |
147 | |
|
148 | |
void registerEndpointBuilder(String name, EndpointBuilder builder) throws MuleException; |
149 | |
|
150 | |
void registerTransformer(Transformer transformer) throws MuleException; |
151 | |
|
152 | |
void unregisterTransformer(String transformerName) throws MuleException; |
153 | |
|
154 | |
void registerService(Service service) throws MuleException; |
155 | |
|
156 | |
void unregisterService(String serviceName) throws MuleException; |
157 | |
|
158 | |
void registerModel(Model model) throws MuleException; |
159 | |
|
160 | |
void unregisterModel(String modelName) throws MuleException; |
161 | |
|
162 | |
void registerAgent(Agent agent) throws MuleException; |
163 | |
|
164 | |
void unregisterAgent(String agentName) throws MuleException; |
165 | |
|
166 | |
|
167 | |
|
168 | |
|
169 | |
|
170 | |
|
171 | |
|
172 | |
ServiceDescriptor lookupServiceDescriptor(String type, String name, Properties overrides) |
173 | |
throws ServiceException; |
174 | |
|
175 | |
|
176 | |
|
177 | |
|
178 | |
|
179 | |
Registry getParent(); |
180 | |
|
181 | |
void setParent(Registry registry); |
182 | |
|
183 | |
String getRegistryId(); |
184 | |
|
185 | |
boolean isReadOnly(); |
186 | |
|
187 | |
boolean isRemote(); |
188 | |
|
189 | |
void setDefaultScope(int scope); |
190 | |
|
191 | |
int getDefaultScope(); |
192 | |
|
193 | |
boolean isInitialised(); |
194 | |
|
195 | |
boolean isInitialising(); |
196 | |
|
197 | |
boolean isDisposed(); |
198 | |
|
199 | |
boolean isDisposing(); |
200 | |
} |