org.ehcache.spi
Interface ServiceProvider<T extends Service>
- Type Parameters:
T
- A bound on service types this provider can return
- All Known Implementing Classes:
- ServiceLocator
public interface ServiceProvider<T extends Service>
This acts as a repository for Service
instances, that can be used to
look them up by type.
Method Summary |
|
getService(java.lang.Class<U> serviceType)
Will look up the Service of the serviceType . |
getService
<U extends T> U getService(java.lang.Class<U> serviceType)
- Will look up the
Service
of the serviceType
.
The returned service will be started or not depending on the started state of the ServiceProvider
.
- Type Parameters:
U
- The actual Service
type- Parameters:
serviceType
- the class
of the service being looked up
- Returns:
- the service instance for
T
type, or null
if it couldn't be located