public class ServiceFactory extends Object
Constructor and Description |
---|
ServiceFactory()
Constructor loading service configuration from the default location.
|
ServiceFactory(String path)
Constructor loading service configuration from a given location.
|
Modifier and Type | Method and Description |
---|---|
<T extends Service> |
getInstance(Class<T> type)
Retrieves an instance of a given service.
|
public ServiceFactory() throws DependencyException
DependencyException
- If there is an error locating or reading from
the default configuration location.public ServiceFactory(String path) throws DependencyException
path
- Location to load service configuration from.DependencyException
- If there is an error locating or reading from
path
.public <T extends Service> T getInstance(Class<T> type) throws DependencyException
type
- Interface type of the service.DependencyException
- If there is an error instantiating the
service instance requested.Copyright © 2005–2016 Open Microscopy Environment. All rights reserved.