|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SimpleServiceLocator
Provide a simple abstraction for getting services by contract or type.
| Method Summary | ||
|---|---|---|
|
getByType(Class<T> implType)
Gets the object of the given type. |
|
|
getByType(String implType)
Gets the object of the given type. |
|
|
getComponent(Class<T> contract,
String name)
Loads a component that implements the given contract and has the given name. |
|
|
getComponent(String fullQualifiedName,
String name)
Analogous to the following: |
|
|
getInhabitantsByContract(String contractName)
|
|
|
getInhabitantsByContract(Type contract)
Gets all the inhabitants that has the given contract. |
|
|
getInhabitantsByType(Class<T> type)
Gets all the inhabitants that has the given type. |
|
|
getInhabitantsByType(String typeName)
|
|
|
getProvider(String fqcn,
String name)
|
|
|
getProvider(Type type,
String name)
Gets an inhabitant from its type and optionally name |
|
| Method Detail |
|---|
<T> T getComponent(Class<T> contract,
String name)
throws ComponentException
name - can be null, in which case it'll only match to the unnamed
component.
ComponentException
<T> T getComponent(String fullQualifiedName,
String name)
getComponent(contractClass.getName(), name);
fullQualifiedName - the contract class namename - can be null, in which case it'll only match to the unnamed
component.
<T> T getByType(Class<T> implType)
<T> T getByType(String implType)
<T> Inhabitant<T> getProvider(Type type,
String name)
type - requested inhabitant typename - optional name
<T> Inhabitant<T> getProvider(String fqcn,
String name)
<T> Collection<Inhabitant<T>> getInhabitantsByContract(Type contract)
throws ComponentException
ComponentException
<T> Collection<Inhabitant<T>> getInhabitantsByContract(String contractName)
throws ComponentException
ComponentException
<T> Collection<Inhabitant<T>> getInhabitantsByType(Class<T> type)
throws ComponentException
ComponentException
<T> Collection<Inhabitant<T>> getInhabitantsByType(String typeName)
throws ComponentException
ComponentException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||