|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.logger.AbstractLoggable | +--org.apache.cocoon.xml.AbstractXMLProducer | +--org.apache.cocoon.components.pipeline.AbstractEventPipeline | +--org.apache.cocoon.components.pipeline.CachingEventPipeline
The CachingEventPipeline If all components of this event pipeline are cacheable then the whole pipeline is also cacheable. If in this case the CacheableEventPipeline interface is invoked (e.g. by the CachingStreamPipeline) the CachingEventPipeline does not cache! (If it would cache, the response would be cached twice!)
Field Summary |
Fields inherited from class org.apache.cocoon.components.pipeline.AbstractEventPipeline |
configuredSAXConnector, connectors, generator, generatorParam, generatorSelector, generatorSource, manager, newManager, transformerParams, transformers, transformerSelectors, transformerSources |
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
contentHandler, lexicalHandler, xmlConsumer |
Fields inherited from interface org.apache.cocoon.components.pipeline.EventPipeline |
ROLE |
Constructor Summary | |
CachingEventPipeline()
|
Method Summary | |
void |
addTransformer(java.lang.String role,
java.lang.String source,
org.apache.avalon.framework.parameters.Parameters param)
Add a transformer. |
void |
compose(org.apache.avalon.framework.component.ComponentManager manager)
|
void |
dispose()
|
PipelineCacheKey |
generateKey(Environment environment)
Generate the unique key. |
java.util.Map |
generateValidity(Environment environment)
Generate the validity object. |
boolean |
process(Environment environment)
Process the given Environment , producing the output. |
void |
recycle()
Recycle the producer by removing references |
void |
setGenerator(java.lang.String role,
java.lang.String source,
org.apache.avalon.framework.parameters.Parameters param)
Set the generator. |
void |
setStreamPipelineCaches(boolean flag)
The stream pipeline (or the content aggregator) calls this method to tell the event pipeline if it must not cache the result |
Methods inherited from class org.apache.cocoon.components.pipeline.AbstractEventPipeline |
checkPipeline, connectPipeline, getGenerator, recompose, setGenerator, setupPipeline |
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
setConsumer, setContentHandler, setLexicalHandler |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable |
getLogger, setLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.cocoon.xml.XMLProducer |
setConsumer |
Constructor Detail |
public CachingEventPipeline()
Method Detail |
public void compose(org.apache.avalon.framework.component.ComponentManager manager) throws org.apache.avalon.framework.component.ComponentException
compose
in interface org.apache.avalon.framework.component.Composable
compose
in class AbstractEventPipeline
org.apache.avalon.framework.component.ComponentException
public void setGenerator(java.lang.String role, java.lang.String source, org.apache.avalon.framework.parameters.Parameters param) throws java.lang.Exception
setGenerator
in interface EventPipeline
setGenerator
in class AbstractEventPipeline
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.
java.lang.Exception
- if the generator couldn't be obtained.public void addTransformer(java.lang.String role, java.lang.String source, org.apache.avalon.framework.parameters.Parameters param) throws java.lang.Exception
addTransformer
in interface EventPipeline
addTransformer
in class AbstractEventPipeline
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.
java.lang.Exception
- if the generator couldn't be obtained.public PipelineCacheKey generateKey(Environment environment) throws java.lang.Exception
PipelineCacheKey
for the whole
EventPipeline.
generateKey
in interface CacheableEventPipeline
environment
- The current environment of the request.
null
if the pipeline
is currently not cacheable as a whole.
java.lang.Exception
public java.util.Map generateValidity(Environment environment) throws java.lang.Exception
generateValidity
in interface CacheableEventPipeline
environment
- The current environment of the request.
null
if the pipeline is currently
not cacheable.
java.lang.Exception
public void setStreamPipelineCaches(boolean flag)
setStreamPipelineCaches
in interface CacheableEventPipeline
public boolean process(Environment environment) throws java.lang.Exception
EventPipeline
Environment
, producing the output.
process
in interface EventPipeline
process
in class AbstractEventPipeline
java.lang.Exception
public void recycle()
AbstractXMLProducer
recycle
in interface org.apache.avalon.excalibur.pool.Recyclable
recycle
in class AbstractEventPipeline
public void dispose()
dispose
in interface org.apache.avalon.framework.activity.Disposable
dispose
in class AbstractEventPipeline
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |