|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IocContainer
This is the interface for the container of an inversion of control (IoC) framework. It is just use as abstraction layer for frameworks like spring, guice or seam - you will not find a native implementation within this project.
Method Summary | ||
---|---|---|
void |
dispose()
This method disposes the container (performs a shutdown and destroys all components). |
|
|
getComponent(Class<COMPONENT_API> apiClass)
This method gets the component that realizes the given apiClass . |
|
|
getComponent(Class<COMPONENT_API> apiClass,
String componentId)
This method gets the component that realizes the given apiClass and is registered under the given
componentId . |
Method Detail |
---|
<COMPONENT_API> COMPONENT_API getComponent(Class<COMPONENT_API> apiClass) throws ResourceAmbiguousException, ResourceMissingException
apiClass
.
COMPONENT_API
- is the generic type of the apiClass
.apiClass
- is the class reflecting the API of the requested component.
This should be an interface.
ResourceMissingException
- if there is no component registered that
implements the given apiClass
.
ResourceAmbiguousException
- if there are multiple components
registered that implement the given apiClass
.<COMPONENT_API> COMPONENT_API getComponent(Class<COMPONENT_API> apiClass, String componentId) throws ResourceMissingException
apiClass
and is registered under the given
componentId
.
COMPONENT_API
- is the generic type of the apiClass
.apiClass
- is the class reflecting the API of the requested component.
This should be an interface.componentId
- is the unique ID under which the component is registered
in this container.
ResourceMissingException
- if there is no component registered under
the given componentId
or the registered component does
NOT realize the given apiClass
.void dispose()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |