| org.apache.cocoon.components.CocoonComponentManager org.apache.cocoon.environment.CocoonRunnable
CocoonRunnable | public class CocoonRunnable extends CocoonComponentManager.AbstractCocoonRunnable (Code) | | 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.
since: 2.1.8 version: $Id: CocoonRunnable.java 433543 2006-08-22 06:22:54Z crossley $ |
Constructor Summary | |
public | CocoonRunnable() Creates an empty CocoonRunnable and copies the environment context
of the calling thread, for later use when calling
CocoonRunnable.doRun() . | public | 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. |
CocoonRunnable | public CocoonRunnable()(Code) | | Creates an empty CocoonRunnable and copies the environment context
of the calling thread, for later use when calling
CocoonRunnable.doRun() . Users of this
constructor will override the
CocoonRunnable.doRun() method where the actual job gets done.
|
CocoonRunnable | public CocoonRunnable(Runnable target)(Code) | | Wraps an existing Runnable and copies the environment context of
the calling thread, for later use when the Runnable 's run()
method is called.
Parameters: target - the wrapped Runnable |
doRun | protected void doRun()(Code) | | Does the actual job, in the environment of the creating thread. Calls the wrapped
Runnable if one was given, and does nothing otherwise.
|
Fields inherited from org.apache.cocoon.components.CocoonComponentManager | final protected static ThreadLocal environmentStack(Code)(Java Doc)
|
Methods inherited from org.apache.cocoon.components.CocoonComponentManager | public void addComponent(String role, Class clazz, Configuration conf) throws ComponentException(Code)(Java Doc) public static void addComponentForAutomaticRelease(ComponentSelector selector, Component component, ComponentManager manager) throws ProcessingException(Code)(Java Doc) public static void addComponentForAutomaticRelease(ComponentManager manager, Component component) throws ProcessingException(Code)(Java Doc) public static void checkEnvironment(int depth, Logger logger) throws Exception(Code)(Java Doc) public static XMLConsumer createEnvironmentAwareConsumer(XMLConsumer consumer)(Code)(Java Doc) public void dispose()(Code)(Java Doc) public static void endProcessing(Environment env, Object key)(Code)(Java Doc) public static void enterEnvironment(Environment env, ComponentManager manager, Processor processor)(Code)(Java Doc) public static Processor getActiveProcessor(Environment env)(Code)(Java Doc) public static Environment getCurrentEnvironment()(Code)(Java Doc) public static Processor getCurrentProcessor()(Code)(Java Doc) public static ComponentManager getSitemapComponentManager()(Code)(Java Doc) public void initialize() throws Exception(Code)(Java Doc) public static void leaveEnvironment()(Code)(Java Doc) public static void leaveEnvironment(boolean success)(Code)(Java Doc) public Component lookup(String role) throws ComponentException(Code)(Java Doc) public static int markEnvironment()(Code)(Java Doc) public void release(Component component)(Code)(Java Doc) public void release(Source source)(Code)(Java Doc) protected void releaseRLComponent(Component component)(Code)(Java Doc) public static void removeFromAutomaticRelease(Component component) throws ProcessingException(Code)(Java Doc) public Source resolveURI(String location) throws MalformedURLException, IOException, SourceException(Code)(Java Doc) public Source resolveURI(String location, String baseURI, Map parameters) throws MalformedURLException, IOException, SourceException(Code)(Java Doc) public void setInstrumentManager(InstrumentManager iManager)(Code)(Java Doc) protected void setParentManager(ComponentManager manager)(Code)(Java Doc) public static Object startProcessing(Environment env)(Code)(Java Doc)
|
|
|