public class ServiceRegistry extends Object
Service implementations and is capable of injecting them into ServiceProvider instances
with fields annotated with Inject. Optionality is supported by using Optional type when declared a field
with Inject. Method injection as Qualifier and Named annotations are not
supported.| Constructor and Description |
|---|
ServiceRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
inject(org.mule.runtime.api.service.ServiceProvider serviceProvider)
Injects the tracked
services into the given serviceProvider |
void |
register(org.mule.runtime.api.service.Service service,
ServiceAssembly assembly)
Tracks the given
service |
public void inject(org.mule.runtime.api.service.ServiceProvider serviceProvider)
throws ServiceResolutionError
services into the given serviceProviderserviceProvider - the injection targetServiceResolutionError - if a dependency could not be injectedpublic void register(org.mule.runtime.api.service.Service service,
ServiceAssembly assembly)
serviceservice - the Service to be trackedassembly - the service's ServiceAssemblyCopyright © 2003–2019 MuleSoft, Inc.. All rights reserved.