Package org.jboss.msc.service
Class DelegatingServiceRegistry
java.lang.Object
org.jboss.msc.service.DelegatingServiceRegistry
- All Implemented Interfaces:
ServiceRegistry
A service registry which delegates to another service registry.
- Author:
- David M. Lloyd, Richard Opalka
-
Constructor Summary
ConstructorsConstructorDescriptionDelegatingServiceRegistry(ServiceRegistry delegate) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected ServiceRegistryGet the ServiceRegistry delegate.getRequiredService(ServiceName serviceName) Get a service, throwing an exception if it is not found.getService(ServiceName serviceName) Get a service, returningnullif it is not found.Get a list of service names installed in this registry.
-
Constructor Details
-
DelegatingServiceRegistry
Construct a new instance.- Parameters:
delegate- the registry to delegate to
-
-
Method Details
-
getDelegate
Get the ServiceRegistry delegate.- Returns:
- ServiceRegistry delegate
-
getRequiredService
public ServiceController<?> getRequiredService(ServiceName serviceName) throws ServiceNotFoundException Get a service, throwing an exception if it is not found.- Specified by:
getRequiredServicein interfaceServiceRegistry- Parameters:
serviceName- the service name- Returns:
- the service controller for the corresponding service
- Throws:
ServiceNotFoundException- if the service is not present in the registry
-
getService
Get a service, returningnullif it is not found.- Specified by:
getServicein interfaceServiceRegistry- Parameters:
serviceName- the service name- Returns:
- the service controller for the corresponding service, or
nullif it is not found
-
getServiceNames
Get a list of service names installed in this registry.- Specified by:
getServiceNamesin interfaceServiceRegistry- Returns:
- the list
-