org.apache.cocoon.components.pipeline.impl
Class CachingPointProcessingPipeline

java.lang.Object
  extended byorg.apache.cocoon.util.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.CachingPointProcessingPipeline
All Implemented Interfaces:
Disposable, Parameterizable, Poolable, org.apache.cocoon.components.pipeline.ProcessingPipeline, Recyclable, Serviceable

public class CachingPointProcessingPipeline
extends AbstractCachingProcessingPipeline

The CachingPointProcessingPipeline

Since:
2.1
Version:
$Id: CachingPointProcessingPipeline.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
protected  boolean autoCachingPoint
           
protected  String autoCachingPointSwitch
           
protected  ArrayList isCachePoint
           
protected  boolean nextIsCachePoint
           
protected  ArrayList xmlSerializerArray
           
 
Fields inherited from class org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
cacheCompleteResponse, cachedResponse, completeResponseIsCached, firstNotCacheableTransformerIndex, firstProcessedTransformerIndex, fromCacheKey, generatorRole, PIPELOCK_PREFIX, readerRole, serializerRole, toCacheKey, toCacheSourceValidities, 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, generatorSource, lastConsumer, manager, newManager, outputBufferSize, parameters, reader, readerMimeType, readerParam, readerSource, serializer, serializerMimeType, serializerParam, serializerSource, sourceResolver, transformerParams, transformers, transformerSources
 
Fields inherited from interface org.apache.cocoon.components.pipeline.ProcessingPipeline
ROLE
 
Constructor Summary
CachingPointProcessingPipeline()
           
 
Method Summary
 void addTransformer(String role, String source, Parameters param, Parameters hintParam)
          Add a transformer.
protected  org.apache.cocoon.caching.CachedResponse cacheResults(org.apache.cocoon.environment.Environment environment, OutputStream os)
          Cache longest cacheable path plus cache points.
protected  void connectCachingPipeline(org.apache.cocoon.environment.Environment environment)
          Connect the caching point pipeline.
 void informBranchPoint()
          Determine if the given branch-point is a caching-point Please Note: this method is used by auto caching-point and is of no consequence when auto caching-point is switched off
protected  ComponentCacheKey newComponentCacheKey(int type, String role, Serializable key)
          Create a new ComponentCachekey ComponentCacheKeys can be flagged as cachepoints
 void parameterize(Parameters config)
          The CachingPointProcessingPipeline is configurable.
 void recycle()
          Recyclable Interface
 void setGenerator(String role, String source, Parameters param, Parameters hintParam)
          Set the generator.
 
Methods inherited from class org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
connectPipeline, generateCachingKey, generateLock, getKeyForEventPipeline, getValidityForEventPipeline, processReader, processXMLPipeline, releaseLock, setReader, setSerializer, setupPipeline, setupValidities, validatePipeline, waitForLock
 
Methods inherited from class org.apache.cocoon.components.pipeline.impl.BaseCachingProcessingPipeline
dispose
 
Methods inherited from class org.apache.cocoon.components.pipeline.AbstractProcessingPipeline
checkIfModified, checkPipeline, connect, getGenerator, getLocation, handleException, isInternalError, prepareInternal, prepareInternalErrorHandler, preparePipeline, process, process, processErrorHandler, service, setErrorHandler, setMimeTypeForReader, setMimeTypeForSerializer, setProcessorManager, setup, setupReader
 
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isCachePoint

protected ArrayList isCachePoint

xmlSerializerArray

protected ArrayList xmlSerializerArray

nextIsCachePoint

protected boolean nextIsCachePoint

autoCachingPointSwitch

protected String autoCachingPointSwitch

autoCachingPoint

protected boolean autoCachingPoint
Constructor Detail

CachingPointProcessingPipeline

public CachingPointProcessingPipeline()
Method Detail

parameterize

public void parameterize(Parameters config)
                  throws ParameterException
The CachingPointProcessingPipeline is configurable. The autoCachingPoint algorithm can be switced on/off in the sitemap.xmap

Specified by:
parameterize in interface Parameterizable
Overrides:
parameterize in class AbstractCachingProcessingPipeline
Throws:
ParameterException

setGenerator

public void setGenerator(String role,
                         String source,
                         Parameters param,
                         Parameters hintParam)
                  throws org.apache.cocoon.ProcessingException
Set the generator.

Specified by:
setGenerator in interface org.apache.cocoon.components.pipeline.ProcessingPipeline
Overrides:
setGenerator in class AbstractCachingProcessingPipeline
Throws:
org.apache.cocoon.ProcessingException

addTransformer

public void addTransformer(String role,
                           String source,
                           Parameters param,
                           Parameters hintParam)
                    throws org.apache.cocoon.ProcessingException
Add a transformer.

Specified by:
addTransformer in interface org.apache.cocoon.components.pipeline.ProcessingPipeline
Overrides:
addTransformer in class AbstractCachingProcessingPipeline
Throws:
org.apache.cocoon.ProcessingException

informBranchPoint

public void informBranchPoint()
Determine if the given branch-point is a caching-point Please Note: this method is used by auto caching-point and is of no consequence when auto caching-point is switched off

Specified by:
informBranchPoint in interface org.apache.cocoon.components.pipeline.ProcessingPipeline
Overrides:
informBranchPoint in class AbstractProcessingPipeline

cacheResults

protected org.apache.cocoon.caching.CachedResponse cacheResults(org.apache.cocoon.environment.Environment environment,
                                                                OutputStream os)
                                                         throws Exception
Cache longest cacheable path plus cache points.

Specified by:
cacheResults in class AbstractCachingProcessingPipeline
Returns:
complete cached response or null
See issue COCOON-2009 for discussion
Throws:
Exception

newComponentCacheKey

protected ComponentCacheKey newComponentCacheKey(int type,
                                                 String role,
                                                 Serializable key)
Create a new ComponentCachekey ComponentCacheKeys can be flagged as cachepoints

Specified by:
newComponentCacheKey in class AbstractCachingProcessingPipeline

connectCachingPipeline

protected void connectCachingPipeline(org.apache.cocoon.environment.Environment environment)
                               throws org.apache.cocoon.ProcessingException
Connect the caching point pipeline.

Specified by:
connectCachingPipeline in class AbstractCachingProcessingPipeline
Throws:
org.apache.cocoon.ProcessingException

recycle

public void recycle()
Recyclable Interface

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


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.