public class SynchronizedServiceRegistry extends Object implements ServiceRegistry
| Constructor and Description |
|---|
SynchronizedServiceRegistry(ServiceRegistry delegate) |
| 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.
|
public SynchronizedServiceRegistry(ServiceRegistry delegate)
public <T> T get(Class<T> serviceType) throws UnknownServiceException
ServiceRegistryget in interface ServiceRegistryT - The service type.serviceType - The service type.UnknownServiceException - When there is no service of the given type available.public <T> Factory<T> getFactory(Class<T> type) throws UnknownServiceException
ServiceRegistrygetFactory in interface ServiceRegistryT - 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.public <T> T newInstance(Class<T> type) throws UnknownServiceException
ServiceRegistrynewInstance in interface ServiceRegistryT - The service type.type - The service typeUnknownServiceException - When there is no factory available for services of the given type.Copyright © 2013. All rights reserved