public class ServiceFactory
extends java.lang.Object
| Constructor and Description |
|---|
ServiceFactory()
Constructor loading service configuration from the default location.
|
ServiceFactory(java.lang.String path)
Constructor loading service configuration from a given location.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Service> |
getInstance(java.lang.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(java.lang.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(java.lang.Class<T> type) throws DependencyException
type - Interface type of the service.DependencyException - If there is an error instantiating the
service instance requested.Copyright © 2014 Open Microscopy Environment