Modifier and Type | Method and Description |
---|---|
<U extends T> |
getService(java.lang.Class<U> serviceType)
Looks up the
Service of the given serviceType . |
<U extends T> |
getServicesOfType(java.lang.Class<U> serviceType)
Looks up all
Service instances that are subtypes of the given serviceType supplied. |
<U extends T> U getService(java.lang.Class<U> serviceType)
Service
of the given serviceType
.
There is no guarantee that services returned here will be started.
U
- the Service
typeserviceType
- the class
of the service being looked upT
, or null
if it couldn't be locatedjava.lang.IllegalArgumentException
- if serviceType
is marked with the
PluralService
annotationService.start(ServiceProvider)
<U extends T> java.util.Collection<U> getServicesOfType(java.lang.Class<U> serviceType)
Service
instances that are subtypes of the given serviceType
supplied.
This method must be used to retrieves service types marked with the
PluralService
annotation.
U
- the Service
typeserviceType
- the class
of the service being looked upserviceType