org.apache.cocoon.components.profiler
Class ProfilingNonCachingProcessingPipeline

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.cocoon.components.pipeline.AbstractProcessingPipeline
          extended byorg.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline
              extended byorg.apache.cocoon.components.profiler.ProfilingNonCachingProcessingPipeline
All Implemented Interfaces:
Disposable, LogEnabled, Parameterizable, Poolable, ProcessingPipeline, Recyclable, Serviceable

public class ProfilingNonCachingProcessingPipeline
extends NonCachingProcessingPipeline
implements Disposable

Special version of the NonCachingProcessingPipeline that supports capturing the SAX-events that go through it and stores the result in the ProfilerData.

Version:
$Id: ProfilingNonCachingProcessingPipeline.java 157268 2005-03-12 19:17:13Z cziegeler $
Author:
Vadim Gritsenko, Stephan Michels, Bruno Dumon

Field Summary
 
Fields inherited from class org.apache.cocoon.components.pipeline.AbstractProcessingPipeline
configuration, configuredExpires, configuredOutputBufferSize, expires, generator, generatorParam, generatorSource, lastConsumer, manager, newManager, outputBufferSize, parameters, processor, reader, readerMimeType, readerParam, readerSource, serializer, serializerMimeType, serializerParam, serializerSource, transformerParams, transformers, transformerSources
 
Fields inherited from interface org.apache.cocoon.components.pipeline.ProcessingPipeline
ROLE
 
Constructor Summary
ProfilingNonCachingProcessingPipeline()
           
 
Method Summary
 void addTransformer(String role, String source, Parameters param, Parameters hintParam)
          Add a transformer at the end of the pipeline.
protected  void connect(Environment environment, XMLProducer producer, XMLConsumer consumer)
          Connect the next component
 void dispose()
          Disposable
 boolean process(Environment environment)
          Process the given Environment, producing the output.
protected  boolean processReader(Environment environment)
          Process the pipeline using a reader.
protected  boolean processXMLPipeline(Environment environment)
          Process the SAX event pipeline
 void recycle()
          Recyclable
 void service(ServiceManager manager)
           
 void setGenerator(String role, String source, Parameters param, Parameters hintParam)
          Set the generator that will be used as the initial step in the pipeline.
 void setReader(String role, String source, Parameters param, String mimeType)
          Set the reader for this pipeline
 void setSerializer(String role, String source, Parameters param, Parameters hintParam, String mimeType)
          Set the serializer for this pipeline
protected  void setupPipeline(Environment environment)
          Setup pipeline components.
 
Methods inherited from class org.apache.cocoon.components.pipeline.AbstractProcessingPipeline
checkIfModified, checkPipeline, connectPipeline, getGenerator, getKeyForEventPipeline, getLocation, getValidityForEventPipeline, handleException, informBranchPoint, isInternalError, parameterize, prepareInternal, prepareInternalErrorHandler, preparePipeline, process, processErrorHandler, setErrorHandler, setMimeTypeForReader, setMimeTypeForSerializer, setProcessorManager, setup, setupReader
 
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, toString, wait, wait, wait
 

Constructor Detail

ProfilingNonCachingProcessingPipeline

public ProfilingNonCachingProcessingPipeline()
Method Detail

service

public void service(ServiceManager manager)
             throws ServiceException
Specified by:
service in interface Serviceable
Overrides:
service in class AbstractProcessingPipeline
Throws:
ServiceException

dispose

public void dispose()
Disposable

Specified by:
dispose in interface Disposable

recycle

public void recycle()
Recyclable

Specified by:
recycle in interface Recyclable
Overrides:
recycle in class AbstractProcessingPipeline

setGenerator

public void setGenerator(String role,
                         String source,
                         Parameters param,
                         Parameters hintParam)
                  throws ProcessingException
Set the generator that will be used as the initial step in the pipeline. The generator role is given : the actual Generator is fetched from the latest ServiceManager.

Specified by:
setGenerator in interface ProcessingPipeline
Overrides:
setGenerator in class AbstractProcessingPipeline
Parameters:
role - the generator role in the component manager.
source - the source where to produce XML from, or null if no source is given.
param - the parameters for the generator.
hintParam -
Throws:
ProcessingException - if the generator couldn't be obtained.

addTransformer

public void addTransformer(String role,
                           String source,
                           Parameters param,
                           Parameters hintParam)
                    throws ProcessingException
Add a transformer at the end of the pipeline. The transformer role is given : the actual Transformer is fetched from the latest ServiceManager.

Specified by:
addTransformer in interface ProcessingPipeline
Overrides:
addTransformer in class AbstractProcessingPipeline
Parameters:
role - the transformer role in the component manager.
source - the source used to setup the transformer (e.g. XSL file), or null if no source is given.
param - the parameters for the transfomer.
hintParam -
Throws:
ProcessingException - if the generator couldn't be obtained.

setSerializer

public void setSerializer(String role,
                          String source,
                          Parameters param,
                          Parameters hintParam,
                          String mimeType)
                   throws ProcessingException
Set the serializer for this pipeline

Specified by:
setSerializer in interface ProcessingPipeline
Overrides:
setSerializer in class AbstractProcessingPipeline
Parameters:
role -
source -
param -
hintParam -
mimeType -
Throws:
ProcessingException

setReader

public void setReader(String role,
                      String source,
                      Parameters param,
                      String mimeType)
               throws ProcessingException
Set the reader for this pipeline

Specified by:
setReader in interface ProcessingPipeline
Overrides:
setReader in class AbstractProcessingPipeline
Parameters:
role -
source -
param -
mimeType -
Throws:
ProcessingException

setupPipeline

protected void setupPipeline(Environment environment)
                      throws ProcessingException
Setup pipeline components.

Overrides:
setupPipeline in class AbstractProcessingPipeline
Parameters:
environment -
Throws:
ProcessingException

process

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

Specified by:
process in interface ProcessingPipeline
Overrides:
process in class AbstractProcessingPipeline
Parameters:
environment -
Returns:
true on success
Throws:
ProcessingException

processXMLPipeline

protected boolean processXMLPipeline(Environment environment)
                              throws ProcessingException
Process the SAX event pipeline

Overrides:
processXMLPipeline in class AbstractProcessingPipeline
Throws:
ProcessingException

processReader

protected boolean processReader(Environment environment)
                         throws ProcessingException
Process the pipeline using a reader.

Overrides:
processReader in class AbstractProcessingPipeline
Throws:
ProcessingException - if

connect

protected void connect(Environment environment,
                       XMLProducer producer,
                       XMLConsumer consumer)
                throws ProcessingException
Connect the next component

Overrides:
connect in class AbstractProcessingPipeline
Parameters:
environment -
producer -
consumer -
Throws:
ProcessingException


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.