public class DelegatingServiceRegistry extends Object implements ServiceRegistry
Constructor and Description |
---|
DelegatingServiceRegistry(ServiceRegistry delegate)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected ServiceRegistry |
getDelegate()
Get the ServiceRegistry delegate.
|
ServiceController<?> |
getRequiredService(ServiceName serviceName)
Get a service, throwing an exception if it is not found.
|
ServiceController<?> |
getService(ServiceName serviceName)
Get a service, returning
null if it is not found. |
List<ServiceName> |
getServiceNames()
Get a list of service names installed in this registry.
|
public DelegatingServiceRegistry(ServiceRegistry delegate)
delegate
- the registry to delegate toprotected ServiceRegistry getDelegate()
public ServiceController<?> getRequiredService(ServiceName serviceName) throws ServiceNotFoundException
getRequiredService
in interface ServiceRegistry
serviceName
- the service nameServiceNotFoundException
- if the service is not present in the registrypublic ServiceController<?> getService(ServiceName serviceName)
null
if it is not found.getService
in interface ServiceRegistry
serviceName
- the service namenull
if it is not foundpublic List<ServiceName> getServiceNames()
getServiceNames
in interface ServiceRegistry
Copyright © 2021 JBoss by Red Hat. All rights reserved.