Modifier and Type | Method and Description |
---|---|
<U extends T> |
getService(java.lang.Class<U> serviceType)
Will look up the
Service of the serviceType . |
<U extends T> |
getServicesOfType(java.lang.Class<U> serviceType)
Looks up all
Service instances registered to support the serviceType supplied. |
<U extends T> U getService(java.lang.Class<U> serviceType)
Service
of the serviceType
.
The returned service will be started or not depending on the started state of the ServiceProvider
.U
- The actual Service
typeserviceType
- the class
of the service being looked upT
type, or null
if it couldn't be locatedjava.lang.IllegalArgumentException
- if serviceType
is marked with the
PluralService
annotation<U extends T> java.util.Collection<U> getServicesOfType(java.lang.Class<U> serviceType)
Service
instances registered to support the serviceType
supplied.
This method must be used for any service type marked with the
PluralService
annotation.U
- the actual Service
typeserviceType
- the class
of the service being looked upserviceType
; the
collection is empty if no services are registered for serviceType