|
eXo Kernel :: Container Multi-Threaded 2.5.0-CR2 | |||||||||
| 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.ConcurrentContainer
org.exoplatform.container.ConcurrentContainerMT
public class ConcurrentContainerMT
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.exoplatform.container.ConcurrentContainer |
|---|
ConcurrentContainer.CreationalContextComponentAdapter<T> |
| Field Summary | |
|---|---|
static String |
THREAD_POOL_SIZE_PARAM_NAME
The name of the system parameter to indicate the total amount of threads to use for the kernel |
| Fields inherited from class org.exoplatform.container.ConcurrentContainer |
|---|
children, componentAdapters, componentKeyToAdapterCache, orderedComponentAdapters |
| Fields inherited from class org.exoplatform.container.AbstractInterceptor |
|---|
holder, parent |
| Fields inherited from class org.exoplatform.container.AbstractContainer |
|---|
delegate |
| Constructor Summary | |
|---|---|
ConcurrentContainerMT()
Creates a new container with the default ComponentAdapterFactory and a parent container. |
|
ConcurrentContainerMT(ExoContainer holder,
ExoContainer parent)
Creates a new container with the default ComponentAdapterFactory and a parent container. |
|
| Method Summary | ||
|---|---|---|
|
addComponentToCtx(Object key)
|
|
|
createComponent(Class<T> clazz)
|
|
|
createComponent(Class<T> clazz,
InitParams params)
|
|
|
createComponentTask(Constructor<T> constructor,
InitParams params,
List<Dependency> dependencies,
DependencyStackListener caller)
|
|
protected
|
execute(ComponentTask<T> task,
ConcurrentContainer.CreationalContextComponentAdapter<?> cCtx)
|
|
|
getArguments(Constructor<T> constructor,
InitParams params,
List<Dependency> dependencies)
|
|
|
getComponentFromSharedMemory(Object key)
Gives a value from the shared memory |
|
protected
|
getComponentInstanceFromContext(ComponentAdapter<T> componentAdapter,
Class<T> bindType)
|
|
|
getComponentInstancesOfType(Class<T> componentType)
A multi-threaded implementation of the start method |
|
ComponentTaskContext |
getComponentTaskContext()
Gives the current context |
|
|
getConstructor(Class<T> clazz,
List<Dependency> dependencies)
|
|
protected ComponentAdapterFactory |
getDefaultComponentAdapterFactory()
|
|
String |
getId()
|
|
void |
initialize()
|
|
|
initializeComponent(Class<T> targetClass,
List<Dependency> dependencies,
List<ComponentTask<Void>> componentInitTasks,
DependencyStackListener caller)
Initializes the instance by injecting objects into fields and the methods with the annotation Inject |
|
void |
loadArguments(Object[] args)
|
|
void |
loadDependencies(Object originalComponentKey,
ComponentTaskContext ctx,
Collection<Dependency> dependencies,
ComponentTaskType type)
|
|
void |
onStartupComplete()
|
|
void |
removeComponentFromCtx(Object key)
|
|
void |
setComponentTaskContext(ComponentTaskContext ctx)
Set the current context |
|
void |
start()
A multi-threaded implementation of the start method |
|
protected void |
start(Collection<ComponentAdapter<?>> adapters,
Map<ComponentAdapter<?>,Object> alreadyStarted,
Set<ComponentAdapter<?>> startInProgress,
AtomicReference<Exception> error,
boolean skippable)
Starts all the provided adapters |
|
| Methods inherited from class org.exoplatform.container.AbstractInterceptor |
|---|
setParent, setSuccessor |
| Methods inherited from class org.exoplatform.container.AbstractContainer |
|---|
getSuccessor |
| 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 |
|---|
getSuccessor |
| Field Detail |
|---|
public static final String THREAD_POOL_SIZE_PARAM_NAME
| Constructor Detail |
|---|
public ConcurrentContainerMT()
ComponentAdapterFactory and a parent container.
public ConcurrentContainerMT(ExoContainer holder,
ExoContainer parent)
ComponentAdapterFactory and a parent container.
holder - the holder of the containerparent - the parent container (used for component dependency lookups).| Method Detail |
|---|
public void initialize()
initialize in interface Containerinitialize in class ConcurrentContainerprotected ComponentAdapterFactory getDefaultComponentAdapterFactory()
getDefaultComponentAdapterFactory in class ConcurrentContainer
protected <T> T getComponentInstanceFromContext(ComponentAdapter<T> componentAdapter,
Class<T> bindType)
getComponentInstanceFromContext in class ConcurrentContainerpublic <T> T getComponentFromSharedMemory(Object key)
public <T> ConcurrentContainer.CreationalContextComponentAdapter<T> addComponentToCtx(Object key)
addComponentToCtx in class ConcurrentContainerpublic void removeComponentFromCtx(Object key)
removeComponentFromCtx in class ConcurrentContainer
public <T> List<T> getComponentInstancesOfType(Class<T> componentType)
throws ContainerException
getComponentInstancesOfType in interface ContainergetComponentInstancesOfType in class ConcurrentContainerContainerExceptionpublic void start()
start in interface Startablestart in class ConcurrentContainer
protected void start(Collection<ComponentAdapter<?>> adapters,
Map<ComponentAdapter<?>,Object> alreadyStarted,
Set<ComponentAdapter<?>> startInProgress,
AtomicReference<Exception> error,
boolean skippable)
public <T> Constructor<T> getConstructor(Class<T> clazz,
List<Dependency> dependencies)
throws Exception
Exception
public <T> boolean initializeComponent(Class<T> targetClass,
List<Dependency> dependencies,
List<ComponentTask<Void>> componentInitTasks,
DependencyStackListener caller)
Inject
true if at least Inject annotation has been found, false otherwise
public <T> T createComponent(Class<T> clazz)
throws Exception
createComponent in class ConcurrentContainerException
public <T> T createComponent(Class<T> clazz,
InitParams params)
throws Exception
createComponent in interface ContainercreateComponent in class ConcurrentContainerException
public <T> ComponentTask<T> createComponentTask(Constructor<T> constructor,
InitParams params,
List<Dependency> dependencies,
DependencyStackListener caller)
throws Exception
Exceptionpublic void loadArguments(Object[] args)
public void loadDependencies(Object originalComponentKey,
ComponentTaskContext ctx,
Collection<Dependency> dependencies,
ComponentTaskType type)
throws Exception
Exceptionpublic ComponentTaskContext getComponentTaskContext()
public void setComponentTaskContext(ComponentTaskContext ctx)
protected <T> T execute(ComponentTask<T> task,
ConcurrentContainer.CreationalContextComponentAdapter<?> cCtx)
throws Exception
Exception
public <T> Object[] getArguments(Constructor<T> constructor,
InitParams params,
List<Dependency> dependencies)
public String getId()
getId in interface InterceptorgetId in class AbstractInterceptorpublic void onStartupComplete()
|
eXo Kernel :: Container Multi-Threaded 2.5.0-CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||