org.apache.cocoon.components.profiler
Class ProfilingCachingProcessingPipeline

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.components.pipeline.AbstractProcessingPipeline
          extended by org.apache.cocoon.components.pipeline.impl.BaseCachingProcessingPipeline
              extended by org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
                  extended by org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline
                      extended by org.apache.cocoon.components.profiler.ProfilingCachingProcessingPipeline
All Implemented Interfaces:
Poolable, Recyclable, Disposable, Component, Composable, Recomposable, LogEnabled, Parameterizable, ProcessingPipeline

public class ProfilingCachingProcessingPipeline
extends CachingProcessingPipeline

Version:
$Id: ProfilingCachingProcessingPipeline.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Vadim Gritsenko, Stephan Michels, Bruno Dumon

Field Summary
 
Fields inherited from class org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
cacheCompleteResponse, cachedResponse, completeResponseIsCached, firstNotCacheableTransformerIndex, firstProcessedTransformerIndex, fromCacheKey, generatorIsCacheableProcessingComponent, generatorRole, lockTimeout, PIPELOCK_PREFIX, readerRole, serializerIsCacheableProcessingComponent, serializerRole, toCacheKey, toCacheSourceValidities, transformerIsCacheableProcessingComponent, transformerRoles, transientStore
 
Fields inherited from class org.apache.cocoon.components.pipeline.impl.BaseCachingProcessingPipeline
cache, xmlDeserializer, xmlSerializer
 
Fields inherited from class org.apache.cocoon.components.pipeline.AbstractProcessingPipeline
configuration, configuredExpires, configuredOutputBufferSize, expires, generator, generatorParam, generatorSelector, generatorSource, lastConsumer, manager, newManager, outputBufferSize, parameters, reader, readerMimeType, readerParam, readerSelector, readerSource, serializer, serializerMimeType, serializerParam, serializerSelector, serializerSource, sitemapReaderMimeType, sitemapSerializerMimeType, transformerParams, transformers, transformerSelectors, transformerSources
 
Fields inherited from interface org.apache.cocoon.components.pipeline.ProcessingPipeline
ROLE
 
Constructor Summary
ProfilingCachingProcessingPipeline()
           
 
Method Summary
 void addTransformer(String role, String source, Parameters param, Parameters hintParam)
          Add a transformer at the end of the pipeline.
 void compose(ComponentManager manager)
          Composable
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 FIXME: VG: Why override processXMLPipeline, not process(env, consumer)?
 void recycle()
          Recyclable
 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)
          Timed version of AbstractProcessingPipeline.setupPipeline(org.apache.cocoon.environment.Environment) and AbstractCachingProcessingPipeline.setupPipeline(org.apache.cocoon.environment.Environment).
 
Methods inherited from class org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline
cacheResults, connectCachingPipeline, newComponentCacheKey
 
Methods inherited from class org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
connectPipeline, generateCachingKey, generateLock, getKeyForEventPipeline, getValidityForEventPipeline, parameterize, releaseLock, setupValidities, validatePipeline, waitForLock
 
Methods inherited from class org.apache.cocoon.components.pipeline.AbstractProcessingPipeline
checkIfModified, checkPipeline, getGenerator, getLocation, handleException, informBranchPoint, isInternalError, prepareInternal, prepareInternalErrorHandler, preparePipeline, process, processErrorHandler, recompose, release, setErrorHandler, setMimeTypeForReader, setMimeTypeForSerializer, 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

ProfilingCachingProcessingPipeline

public ProfilingCachingProcessingPipeline()
Method Detail

compose

public void compose(ComponentManager manager)
             throws ComponentException
Composable

Specified by:
compose in interface Composable
Overrides:
compose in class AbstractProcessingPipeline
Parameters:
manager -
Throws:
ComponentException

dispose

public void dispose()
Disposable

Specified by:
dispose in interface Disposable
Overrides:
dispose in class BaseCachingProcessingPipeline

recycle

public void recycle()
Recyclable

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

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 ComponentManager given by compose() or recompose().

Specified by:
setGenerator in interface ProcessingPipeline
Overrides:
setGenerator in class AbstractCachingProcessingPipeline
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 ComponentManager given by compose() or recompose().

Specified by:
addTransformer in interface ProcessingPipeline
Overrides:
addTransformer in class AbstractCachingProcessingPipeline
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 AbstractCachingProcessingPipeline
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 AbstractCachingProcessingPipeline
Parameters:
role -
source -
param -
mimeType -
Throws:
ProcessingException

setupPipeline

protected void setupPipeline(Environment environment)
                      throws ProcessingException
Timed version of AbstractProcessingPipeline.setupPipeline(org.apache.cocoon.environment.Environment) and AbstractCachingProcessingPipeline.setupPipeline(org.apache.cocoon.environment.Environment).

Overrides:
setupPipeline in class AbstractCachingProcessingPipeline
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 FIXME: VG: Why override processXMLPipeline, not process(env, consumer)?

Overrides:
processXMLPipeline in class AbstractCachingProcessingPipeline
Throws:
ProcessingException

processReader

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

Overrides:
processReader in class AbstractCachingProcessingPipeline
Throws:
ProcessingException - if an error occurs

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-2010 The Apache Software Foundation. All Rights Reserved.