public interface ServiceRegistry
| Modifier and Type | Method and Description |
|---|---|
static ServiceRegistry |
create() |
Collection<org.mule.runtime.api.service.Service> |
getAllServices() |
<S extends org.mule.runtime.api.service.Service> |
getService(Class<? extends S> serviceInterface)
Gets the service implementation for the provided interface.
|
<S extends org.mule.runtime.api.service.Service> |
register(S service,
Class<? extends S> serviceContract)
Tracks the given
service |
<S extends org.mule.runtime.api.service.Service> |
unregister(Class<? extends S> serviceInterface)
Un-tracks the given
service. |
static ServiceRegistry create()
ServiceRegistry that does dependency injection between the registered services.<S extends org.mule.runtime.api.service.Service> void register(S service,
Class<? extends S> serviceContract)
serviceservice - the Service to be trackedserviceInterface - the interface of the service to unregister, as declared in
ServiceAssembly.getServiceContract() on #register(Service, ServiceAssembly).<S extends org.mule.runtime.api.service.Service> void unregister(Class<? extends S> serviceInterface)
service.S - the specific service interfaceserviceInterface - the interface of the service to unregister, as declared in
ServiceAssembly.getServiceContract() on #register(Service, ServiceAssembly).<S extends org.mule.runtime.api.service.Service> Optional<S> getService(Class<? extends S> serviceInterface)
S - the specific service interfaceserviceContract - the interface of the service to get, as declared in ServiceAssembly.getServiceContract() on
#register(Service, ServiceAssembly).registered service for the provided
serviceInterface.Collection<org.mule.runtime.api.service.Service> getAllServices()
registered services.Copyright © 2003–2023 MuleSoft, Inc.. All rights reserved.