public interface ServiceContext
Modifier and Type | Method and Description |
---|---|
static ServiceContext |
getInstance()
Get the current
ServiceContext . |
<T> Optional<T> |
getService(Class<T> serviceType)
Access a service singleton via its type.
|
<T> List<T> |
getServices(Class<T> serviceType)
Access a list current services, given its type.
|
default int |
ordinal() |
static ServiceContext getInstance()
ServiceContext
. If necessary the ServiceContext
will be laziliy loaded.ServiceContext
to be used.default int ordinal()
<T> Optional<T> getService(Class<T> serviceType)
Priority
will be used.serviceType
- the service type.null
ConfigException
- if there are multiple service implementations with the maximum priority.<T> List<T> getServices(Class<T> serviceType)
serviceType
- the service type.null
Copyright © 2014–2015 Apache Software Foundation. All rights reserved.