|
eXo Kernel :: Container 2.5.0-GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.container.AbstractContainer
org.exoplatform.container.AbstractInterceptor
org.exoplatform.container.CachingContainer
public class CachingContainer
| Field Summary |
|---|
| Fields inherited from class org.exoplatform.container.AbstractInterceptor |
|---|
holder, parent |
| Fields inherited from class org.exoplatform.container.AbstractContainer |
|---|
delegate |
| Constructor Summary | |
|---|---|
CachingContainer()
|
|
| Method Summary | ||
|---|---|---|
|
getComponentAdapterOfType(Class<T> componentType,
boolean autoRegistration)
Find a component adapter associated with the specified type. |
|
|
getComponentAdaptersOfType(Class<T> componentType)
Retrieve all component adapters inside this container that are associated with the specified type. |
|
|
getComponentInstance(Object componentKey,
Class<T> bindType,
boolean autoRegistration)
Retrieve a component instance registered with a specific key. |
|
|
getComponentInstanceOfType(Class<T> componentType,
boolean autoRegistration)
Find a component instance matching the specified type. |
|
|
getComponentInstancesOfType(Class<T> componentType)
Returns a List of components of a certain componentType. |
|
String |
getId()
Gives an identifier to the Container, allowing to inject an Interceptor into the Interceptor
chain. |
|
|
registerComponentImplementation(Object componentKey,
Class<T> componentImplementation)
Register a component. |
|
|
registerComponentInstance(Object componentKey,
T componentInstance)
Register an arbitrary object as a component in the container. |
|
ComponentAdapter<?> |
unregisterComponent(Object componentKey)
Unregister a component by key. |
|
| Methods inherited from class org.exoplatform.container.AbstractInterceptor |
|---|
setHolder, setParent, setSuccessor |
| Methods inherited from class org.exoplatform.container.AbstractContainer |
|---|
accept, createComponent, dispose, getComponentAdapter, getComponentAdapters, getManagementContext, getMBeanServer, getScopingObjectName, getSuccessor, initialize, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.exoplatform.container.spi.Container |
|---|
accept, createComponent, getComponentAdapter, getComponentAdapters, getManagementContext, getMBeanServer, getScopingObjectName, getSuccessor, initialize |
| Methods inherited from interface org.picocontainer.Startable |
|---|
start, stop |
| Methods inherited from interface org.picocontainer.Disposable |
|---|
dispose |
| Constructor Detail |
|---|
public CachingContainer()
| Method Detail |
|---|
public <T> ComponentAdapter<T> getComponentAdapterOfType(Class<T> componentType,
boolean autoRegistration)
AbstractContainer
getComponentAdapterOfType in interface ContainergetComponentAdapterOfType in class AbstractContainercomponentType - the type of the component.autoRegistration - indicates whether the auto registration should be performed or not
null if no component has been
registered for the specified key.public <T> List<ComponentAdapter<T>> getComponentAdaptersOfType(Class<T> componentType)
AbstractContainer
getComponentAdaptersOfType in interface ContainergetComponentAdaptersOfType in class AbstractContainercomponentType - the type of the components.
ComponentAdapters inside this container that are associated with
the specified type. Changes to this collection will not be reflected in the container itself.
public <T> List<T> getComponentInstancesOfType(Class<T> componentType)
throws ContainerException
AbstractContainer
getComponentInstancesOfType in interface ContainergetComponentInstancesOfType in class AbstractContainercomponentType - the searched type.
ContainerException
public <T> T getComponentInstance(Object componentKey,
Class<T> bindType,
boolean autoRegistration)
throws ContainerException
AbstractContainer
getComponentInstance in interface ContainergetComponentInstance in class AbstractContainercomponentKey - the key that the component was registered with.bindType - the expected type of the instance if one can be found.autoRegistration - indicates whether the auto registration should be performed or not
null if no component has been registered for the specified
key.
ContainerException
public <T> T getComponentInstanceOfType(Class<T> componentType,
boolean autoRegistration)
AbstractContainer
getComponentInstanceOfType in interface ContainergetComponentInstanceOfType in class AbstractContainercomponentType - the type of the component.autoRegistration - indicates whether the auto registration should be performed or not
public ComponentAdapter<?> unregisterComponent(Object componentKey)
AbstractContainer
unregisterComponent in interface ContainerunregisterComponent in class AbstractContainercomponentKey - key of the component to unregister.
public <T> ComponentAdapter<T> registerComponentInstance(Object componentKey,
T componentInstance)
throws ContainerException
AbstractContainer
registerComponentInstance in interface ContainerregisterComponentInstance in class AbstractContainercomponentKey - a key that identifies the component. Must be unique within the container. The type of the
key object has no semantic significance unless explicitly specified in the implementing
container.componentInstance - an arbitrary object.
getXXX() methods of the
Container interface can be used to retrieve a reference to the component later on.
ContainerException - if registration fails.
public <T> ComponentAdapter<T> registerComponentImplementation(Object componentKey,
Class<T> componentImplementation)
throws ContainerException
AbstractContainer
registerComponentImplementation in interface ContainerregisterComponentImplementation in class AbstractContainercomponentKey - a key that identifies the component. Must be unique within the container. The type
of the key object has no semantic significance unless explicitly specified in the
documentation of the implementing container.componentImplementation - the component's implementation class. This must be a concrete class (ie, a
class that can be instantiated).
getXXX() methods of the
Container interface can be used to retrieve a reference to the component later on.
ContainerExceptionpublic String getId()
Interceptor into the Interceptor
chain.
getId in interface InterceptorgetId in class AbstractInterceptor
|
eXo Kernel :: Container 2.5.0-GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||