public interface ServiceRegistry
| Modifier and Type | Method and Description |
|---|---|
<T> T |
get(Class<T> serviceType)
Locates the service of the given type.
|
<T> Factory<T> |
getFactory(Class<T> type)
Locates a factory which can create services of the given type.
|
<T> T |
newInstance(Class<T> type)
Creates a new service instance of the given type.
|
<T> T get(Class<T> serviceType) throws UnknownServiceException
T - The service type.serviceType - The service type.UnknownServiceException - When there is no service of the given type available.<T> Factory<T> getFactory(Class<T> type) throws UnknownServiceException
T - The service type that the factory should create.type - The service type that the factory should create.UnknownServiceException - When there is no factory available for services of the given type.<T> T newInstance(Class<T> type) throws UnknownServiceException
T - The service type.type - The service typeUnknownServiceException - When there is no factory available for services of the given type.Copyright © 2013. All rights reserved