|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServiceLocator
A simple infrastructure to programmatically wire the various components of the repository system together when it is used outside of an IoC container. Once a concrete implementation of a service locator has been setup, clients could use
RepositorySystem repoSystem = serviceLocator.getService( RepositorySystem.class );to acquire the repository system. Components that implement
Service
will be given an opportunity to acquire
further components from the locator, thereby allowing to create the complete object graph of the repository system.
Method Summary | ||
---|---|---|
|
getService(Class<T> type)
Gets an instance of the specified service. |
|
|
getServices(Class<T> type)
Gets all available instances of the specified service. |
Method Detail |
---|
<T> T getService(Class<T> type)
T
- The service type.type
- The interface describing the service, must not be null
.
null
if the service could not be located/initialized.<T> List<T> getServices(Class<T> type)
T
- The service type.type
- The interface describing the service, must not be null
.
null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |