org.apache.cocoon.components.treeprocessor
Class ConcreteTreeProcessor

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor
All Implemented Interfaces:
Disposable, Component, LogEnabled, Processor

public class ConcreteTreeProcessor
extends AbstractLogEnabled
implements Processor, Disposable

The concrete implementation of Processor, containing the evaluation tree and associated data such as component manager.

Version:
$Id: ConcreteTreeProcessor.html 1304258 2012-03-23 10:09:27Z ilgrosso $

Field Summary
 
Fields inherited from interface org.apache.cocoon.Processor
ROLE
 
Constructor Summary
ConcreteTreeProcessor(TreeProcessor wrappingProcessor)
          Builds a concrete processig, given the wrapping processor
 
Method Summary
 ProcessingPipeline buildPipeline(Environment environment)
          Process the given Environment to assemble a ProcessingPipeline.
 void dispose()
           
 Map getComponentConfigurations()
          Get the sitemap component configurations
 Processor getRootProcessor()
          Get the root processor parent of this processor.
 TreeProcessor getWrappingProcessor()
           
 void markForDisposal()
          Mark this processor as needing to be disposed.
 boolean process(Environment environment)
          Process the given Environment producing the output.
protected  boolean process(Environment environment, InvokeContext context)
          Do the actual processing, be it producing the response or just building the pipeline
 void setComponentConfigurations(Configuration componentConfigurations)
          Set the sitemap component configurations (called as part of the tree building process)
 void setProcessorData(ComponentManager manager, ProcessingNode rootNode, List disposableNodes)
          Set the processor data, result of the treebuilder job
 String toString()
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConcreteTreeProcessor

public ConcreteTreeProcessor(TreeProcessor wrappingProcessor)
Builds a concrete processig, given the wrapping processor

Method Detail

setProcessorData

public void setProcessorData(ComponentManager manager,
                             ProcessingNode rootNode,
                             List disposableNodes)
Set the processor data, result of the treebuilder job


setComponentConfigurations

public void setComponentConfigurations(Configuration componentConfigurations)
Set the sitemap component configurations (called as part of the tree building process)


getComponentConfigurations

public Map getComponentConfigurations()
Get the sitemap component configurations

Specified by:
getComponentConfigurations in interface Processor
Since:
2.1

markForDisposal

public void markForDisposal()
Mark this processor as needing to be disposed. Actual call to dispose() will occur when all request processings on this processor will be terminated.


getWrappingProcessor

public TreeProcessor getWrappingProcessor()

getRootProcessor

public Processor getRootProcessor()
Description copied from interface: Processor
Get the root processor parent of this processor.

Specified by:
getRootProcessor in interface Processor

process

public boolean process(Environment environment)
                throws Exception
Process the given Environment producing the output.

Specified by:
process in interface Processor
Returns:
If the processing is successfull true is returned. If not match is found in the sitemap false is returned.
Throws:
ResourceNotFoundException - If a sitemap component tries to access a resource which can not be found, e.g. the generator ConnectionResetException If the connection was reset
Exception

buildPipeline

public ProcessingPipeline buildPipeline(Environment environment)
                                 throws Exception
Process the given Environment to assemble a ProcessingPipeline.

Specified by:
buildPipeline in interface Processor
Throws:
Exception
Since:
2.1

process

protected boolean process(Environment environment,
                          InvokeContext context)
                   throws Exception
Do the actual processing, be it producing the response or just building the pipeline

Parameters:
environment -
context -
Returns:
true if the pipeline was successfully built, false otherwise.
Throws:
Exception

dispose

public void dispose()
Specified by:
dispose in interface Disposable

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.