public interface ServiceRegistry
services
.Modifier and Type | Method and Description |
---|---|
ServiceRegistry |
getParentServiceRegistry()
Retrieve this registry's parent registry.
|
<R extends Service> |
getService(java.lang.Class<R> serviceRole)
Retrieve a service by role.
|
default <R extends Service> |
requireService(java.lang.Class<R> serviceRole)
Retrieve a service by role.
|
ServiceRegistry getParentServiceRegistry()
<R extends Service> R getService(java.lang.Class<R> serviceRole)
ServiceInitiator
is
registered for this service role, the service will be initialized and returned.
NOTE: We cannot return <R extends Service<T>>
here because the service might come from the parent...R
- The service role typeserviceRole
- The service roleUnknownServiceException
- Indicates the service was not known.default <R extends Service> R requireService(java.lang.Class<R> serviceRole)
ServiceInitiator
is
registered for this service role, the service will be initialized and returned.
NOTE: We cannot return <R extends Service<T>>
here because the service might come from the parent...R
- The service role typeserviceRole
- The service roleUnknownServiceException
- Indicates the service was not known.NullServiceException
- Indicates the service was null.Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.