public final class DelegatingServiceRegistry extends Object implements ServiceRegistry
Constructor and Description |
---|
DelegatingServiceRegistry(ServiceRegistry delegate)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
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 topublic 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 © 2018 JBoss by Red Hat. All rights reserved.