|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cocoon.pipeline.AbstractPipeline
org.apache.cocoon.pipeline.CachingPipeline
public class CachingPipeline
A Pipeline
implementation that returns a cached result if, and only if all its components support caching. A
PipelineComponent
is cacheable if it implements the interface CachingPipelineComponent
.
Field Summary | |
---|---|
protected CacheKey |
cacheKey
|
protected CachingOutputStream |
cachingOutputStream
|
protected PipelineCache |
pipelineCache
|
Constructor Summary | |
---|---|
CachingPipeline()
|
Method Summary | |
---|---|
CacheKey |
constructCacheKey()
|
void |
execute()
After the pipeline has been setup ( Pipeline.setup(OutputStream, Map) , this method can be invoked in order to
produce the result. |
protected CacheValue |
getCachedValue(CacheKey cacheKey)
|
long |
getLastModified()
Get the time of the last modification. |
protected void |
setCachedValue(CacheKey cacheKey,
CacheValue cacheValue)
|
void |
setPipelineCache(PipelineCache pipelineCache)
|
void |
setup(OutputStream outputStream)
After the pipeline has been prepared ( Pipeline.addComponent(PipelineComponent) , this method can be invoked in
order to setup and initialize the pipeline and its components. |
void |
setup(OutputStream outputStream,
Map<String,Object> parameters)
The same as Pipeline.setup(OutputStream) but also allows passing parameters to the pipeline components. |
Methods inherited from class org.apache.cocoon.pipeline.AbstractPipeline |
---|
addComponent, getComponents, getContentType, getFinisher, invokeStarter, setupComponents, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected PipelineCache pipelineCache
protected CacheKey cacheKey
protected CachingOutputStream cachingOutputStream
Constructor Detail |
---|
public CachingPipeline()
Method Detail |
---|
public void setup(OutputStream outputStream)
AbstractPipeline
Pipeline.addComponent(PipelineComponent)
, this method can be invoked in
order to setup and initialize the pipeline and its components.
setup
in interface Pipeline
setup
in class AbstractPipeline
outputStream
- An OutputStream
where the pipeline execution result is written.Pipeline.setup(java.io.OutputStream, java.util.Map)
public void setup(OutputStream outputStream, Map<String,Object> parameters)
AbstractPipeline
Pipeline.setup(OutputStream)
but also allows passing parameters to the pipeline components.
setup
in interface Pipeline
setup
in class AbstractPipeline
outputStream
- An OutputStream
where the pipeline execution result is written.parameters
- A Map
of parameters that are available to all PipelineComponent
s.Pipeline.setup(java.io.OutputStream, java.util.Map)
public void execute() throws Exception
AbstractPipeline
Pipeline.setup(OutputStream, Map)
, this method can be invoked in order to
produce the result.
execute
in interface Pipeline
execute
in class AbstractPipeline
Exception
- Any problem that might occur while processing the pipeline.Pipeline.execute()
public void setPipelineCache(PipelineCache pipelineCache)
public long getLastModified()
Pipeline
getLastModified
in interface Pipeline
getLastModified
in class AbstractPipeline
public CacheKey constructCacheKey()
protected CacheValue getCachedValue(CacheKey cacheKey)
protected void setCachedValue(CacheKey cacheKey, CacheValue cacheValue)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |