|
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.ComponentTaskContext
public class ComponentTaskContext
| Constructor Summary | |
|---|---|
ComponentTaskContext(Object componentKey,
ComponentTaskType type)
Default constructor |
|
| Method Summary | ||
|---|---|---|
|
addComponentToContext(Object key,
ConcurrentContainer.CreationalContextComponentAdapter<T> ctx)
Adds the CreationalContext of the component corresponding to the given key, to the dependency resolution
context |
|
ComponentTaskContext |
addToContext(Object componentKey)
This method will call addToContext(Object, ComponentTaskType) with the lastTaskType as type |
|
ComponentTaskContext |
addToContext(Object componentKey,
ComponentTaskType type)
Creates a new ComponentTaskContext based on the given dependency and the
already registered ones. |
|
void |
checkDependency(Object componentKey,
ComponentTaskType type)
Checks if the given dependency has already been defined, if so a CyclicDependencyException
will be thrown. |
|
|
getComponentInstanceFromContext(Object key,
Class<T> bindType)
Tries to get the component related to the given from the context, if it can be found the current state of the component instance is returned, otherwise null is returned |
|
boolean |
isLast(Object componentKey)
Indicates whether the provided componentKey is the last dependency that has been added to the context. |
|
boolean |
isRoot()
|
|
ConcurrentContainer.CreationalContextComponentAdapter<?> |
removeComponentFromContext(Object key)
Removes the CreationalContext of the component corresponding to the given key, from the dependency resolution
context |
|
ComponentTaskContext |
resetDependencies(Object key,
ComponentTaskType type)
Resets the dependencies but keeps the current dependency resolution context. |
|
ComponentTaskContext |
setLastTaskType(ComponentTaskType lastTaskType)
Defines explicitly the last task type known |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ComponentTaskContext(Object componentKey,
ComponentTaskType type)
| Method Detail |
|---|
public ComponentTaskContext setLastTaskType(ComponentTaskType lastTaskType)
public ComponentTaskContext addToContext(Object componentKey)
throws CyclicDependencyException
addToContext(Object, ComponentTaskType) with the lastTaskType as type
CyclicDependencyException
public ComponentTaskContext addToContext(Object componentKey,
ComponentTaskType type)
throws CyclicDependencyException
ComponentTaskContext based on the given dependency and the
already registered ones. If the dependency has already been registered
a CyclicDependencyException will be thrown.
CyclicDependencyException
public void checkDependency(Object componentKey,
ComponentTaskType type)
throws CyclicDependencyException
CyclicDependencyException
will be thrown.
CyclicDependencyExceptionpublic boolean isLast(Object componentKey)
true if the dependency is the last, false otherwise.public boolean isRoot()
public <T> ConcurrentContainer.CreationalContextComponentAdapter<T> addComponentToContext(Object key,
ConcurrentContainer.CreationalContextComponentAdapter<T> ctx)
CreationalContext of the component corresponding to the given key, to the dependency resolution
context
key - The key of the component to add to the contextctx - The CreationalContext of the component to add to the context
ConcurrentContainer.CreationalContextComponentAdapter instance that has been put into the mappublic ConcurrentContainer.CreationalContextComponentAdapter<?> removeComponentFromContext(Object key)
CreationalContext of the component corresponding to the given key, from the dependency resolution
context
key - The key of the component to remove from the context
public <T> T getComponentInstanceFromContext(Object key,
Class<T> bindType)
null is returned
public ComponentTaskContext resetDependencies(Object key,
ComponentTaskType type)
key - the key of the new first dependencytype - the type of the corresponding task
ComponentTaskContext instance with the dependencies resetedpublic String toString()
toString in class Object
|
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 | |||||||||