|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.components.CocoonComponentManager.AbstractCocoonRunnable org.apache.cocoon.environment.CocoonRunnable
public class CocoonRunnable
A Runnable
wrapper or base class that inherits the execution
context of the thread creating it, as it was at the time of creation.
It is meant to be used when processing of a request is to be split across several cooperating threads (e.g. parallel aggregation).
Note: a CocoonRunnable
should not live longer than the
end of the execution of the request in the creating thread, otherwise some unexpected
behaviours may happen because the parent's environment has been released.
Constructor Summary | |
---|---|
CocoonRunnable()
Creates an empty CocoonRunnable and copies the environment context
of the calling thread, for later use when calling doRun() . |
|
CocoonRunnable(Runnable target)
Wraps an existing Runnable and copies the environment context of
the calling thread, for later use when the Runnable 's run()
method is called. |
Method Summary | |
---|---|
protected void |
doRun()
Does the actual job, in the environment of the creating thread. |
Methods inherited from class org.apache.cocoon.components.CocoonComponentManager.AbstractCocoonRunnable |
---|
run |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CocoonRunnable()
CocoonRunnable
and copies the environment context
of the calling thread, for later use when calling doRun()
. Users of this
constructor will override the doRun()
method where the actual job gets done.
public CocoonRunnable(Runnable target)
Runnable
and copies the environment context of
the calling thread, for later use when the Runnable
's run()
method is called.
target
- the wrapped Runnable
Method Detail |
---|
protected void doRun()
Runnable
if one was given, and does nothing otherwise.
doRun
in class CocoonComponentManager.AbstractCocoonRunnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |