|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BaseServiceLocator
Provide a simple abstraction for getting services by contract or type.
| Method Summary | ||
|---|---|---|
|
getAllByContract(Class<T> contractType)
Gets all the inhabitants registered under the given Contract. |
|
|
getAllByContract(String contractType)
|
|
|
getByContract(Class<T> contractType)
Gets the object that has the given contract. |
|
|
getByContract(String contractType)
|
|
|
getByType(Class<T> implType)
Gets the object of the given type. |
|
|
getByType(String implType)
Gets the object of the given type. |
|
|
getComponent(Class<T> clazz)
|
|
|
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: |
|
| 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 getComponent(Class<T> clazz)
throws ComponentException
ComponentException<T> T getByType(Class<T> implType)
<T> T getByType(String implType)
<T> T getByContract(Class<T> contractType)
<T> T getByContract(String contractType)
<T> Collection<T> getAllByContract(Class<T> contractType)
Contract.
This is an example of heterogeneous type-safe container.
<T> Collection<T> getAllByContract(String contractType)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||