org.apache.cocoon.components.profiler
Class ProfilingCachingProcessingPipeline

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

public class ProfilingCachingProcessingPipeline
extends CachingProcessingPipeline

Version:
$Id: ProfilingCachingProcessingPipeline.java 157222 2005-03-12 03:22:51Z vgritsenko $
Author:
Vadim Gritsenko, Stephan Michels, Bruno Dumon

Field Summary
 
Fields inherited from class org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
cacheCompleteResponse, cachedResponse, completeResponseIsCached, configuredDoSmartCaching, doSmartCaching, firstNotCacheableTransformerIndex, firstProcessedTransformerIndex, fromCacheKey, generatorRole, readerRole, serializerRole, toCacheKey, toCacheSourceValidities, transformerRoles
 
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, 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
ProfilingCachingProcessingPipeline()
           
 
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 FIXME: VG: Why override processXMLPipeline, not process(env, consumer)?
 void recycle()
          Recyclable
 void service(ServiceManager manager)
          Composable
 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, getKeyForEventPipeline, getValidityForEventPipeline, parameterize, setup, setupValidities, validatePipeline
 
Methods inherited from class org.apache.cocoon.components.pipeline.AbstractProcessingPipeline
checkIfModified, checkPipeline, getGenerator, getLocation, handleException, informBranchPoint, isInternalError, prepareInternal, prepareInternalErrorHandler, preparePipeline, process, processErrorHandler, setErrorHandler, setMimeTypeForReader, setMimeTypeForSerializer, setProcessorManager, 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

service

public void service(ServiceManager manager)
             throws ServiceException
Composable

Specified by:
service in interface Serviceable
Overrides:
service in class AbstractProcessingPipeline
Throws:
ServiceException

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 ServiceManager.

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 ServiceManager.

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