public interface ComponentContainer
Ioc
/context and dependency injection (CDI) container. It is just use as
abstraction layer for frameworks like spring, guice or seam - you will not find a native implementation within this
project.Modifier and Type | Method and Description |
---|---|
<COMPONENT_API> |
get(Class<COMPONENT_API> apiClass)
This method gets the component that realizes the given
apiClass . |
<COMPONENT_API> |
get(Class<COMPONENT_API> apiClass,
String componentId)
This method gets the component that realizes the given
apiClass and is registered under the given
componentId . |
<COMPONENT_API> COMPONENT_API get(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 get(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
.Copyright © 2001–2016 mmm-Team. All rights reserved.