public class ConcurrentContainerMT extends ConcurrentContainer
ConcurrentContainer.CreationalContextComponentAdapter<T>| Modifier and Type | Field and Description |
|---|---|
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
|
children, componentAdapters, componentKeyToAdapterCache, orderedComponentAdaptersholder, parentdelegate| Constructor and Description |
|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
<T> ConcurrentContainer.CreationalContextComponentAdapter<T> |
addComponentToCtx(Object key) |
<T> T |
createComponent(Class<T> clazz) |
<T> T |
createComponent(Class<T> clazz,
InitParams params) |
<T> ComponentTask<T> |
createComponentTask(Constructor<T> constructor,
InitParams params,
List<Dependency> dependencies,
DependencyStackListener caller) |
protected <T> T |
execute(ComponentTask<T> task,
ConcurrentContainer.CreationalContextComponentAdapter<?> cCtx) |
<T> Object[] |
getArguments(Constructor<T> constructor,
InitParams params,
List<Dependency> dependencies) |
<T> T |
getComponentFromSharedMemory(Object key)
Gives a value from the shared memory
|
protected <T> T |
getComponentInstanceFromContext(ComponentAdapter<T> componentAdapter,
Class<T> bindType) |
<T> List<T> |
getComponentInstancesOfType(Class<T> componentType)
A multi-threaded implementation of the start method
|
ComponentTaskContext |
getComponentTaskContext()
Gives the current context
|
<T> Constructor<T> |
getConstructor(Class<T> clazz,
List<Dependency> dependencies) |
protected ComponentAdapterFactory |
getDefaultComponentAdapterFactory() |
String |
getId() |
void |
initialize() |
<T> boolean |
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
|
accept, addMethods, addOrderedComponentAdapter, dispose, getCache, getComponentAdapter, getComponentAdapterOfType, getComponentAdapters, getComponentAdaptersOfType, getComponentInstance, getComponentInstanceOfType, getComponentInstances, getHolder, getInstance, getManagementContext, getMBeanServer, getScopingObjectName, initializeComponent, registerComponent, registerComponentImplementation, registerComponentInstance, setHolder, stop, unregisterComponentsetParent, setSuccessorgetSuccessorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSuccessorpublic static final String THREAD_POOL_SIZE_PARAM_NAME
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).public void initialize()
initialize in interface Containerinitialize in class ConcurrentContainerprotected ComponentAdapterFactory getDefaultComponentAdapterFactory()
getDefaultComponentAdapterFactory in class ConcurrentContainerprotected <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 ConcurrentContainerpublic <T> List<T> getComponentInstancesOfType(Class<T> componentType) throws ContainerException
getComponentInstancesOfType in interface ContainergetComponentInstancesOfType in class ConcurrentContainerContainerExceptionpublic void start()
start in interface Startablestart in class ConcurrentContainerprotected 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
Exceptionpublic <T> boolean initializeComponent(Class<T> targetClass, List<Dependency> dependencies, List<ComponentTask<Void>> componentInitTasks, DependencyStackListener caller)
Injecttrue if at least Inject annotation has been found, false otherwisepublic <T> T createComponent(Class<T> clazz) throws Exception
createComponent in class ConcurrentContainerExceptionpublic <T> T createComponent(Class<T> clazz, InitParams params) throws Exception
createComponent in interface ContainercreateComponent in class ConcurrentContainerExceptionpublic <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
Exceptionpublic <T> Object[] getArguments(Constructor<T> constructor, InitParams params, List<Dependency> dependencies)
public String getId()
getId in interface InterceptorgetId in class AbstractInterceptorpublic void onStartupComplete()
Copyright © 2019 eXo Platform SAS. All Rights Reserved.