|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.generation.AbstractGenerator
org.apache.cocoon.generation.RequestParameterGenerator
The RequestParameterGenerator
is a simple generator producing as an
output a subset of what the RequestGenerator
produces.
This generator limits its output to the production of request parameters, completely ignoring things like headers and configurations. An example:
<req:request xmlns:req="http://apache.org/cocoon/request/2.0"> <req:requestParameters> <req:parameter name="aParameter"> <req:value>itsValueitsFirstValueitsSecondValue[...] </req:requestParameters> </req:request>
The benefits of this simplified version of RequestGenerator
is that
it is cacheable. The cacheability is achieved by crafting a very specific
key
to be passed to Cocoon, so that the caching pipeline can
actually identify the differences in parameters.
NOTE: given the nature of this generator, and the strain it might put onto the cache system, it is strongly suggested to limit its use to internal pipelines only, with a controlled number of parameter and values passed to it.
Field Summary | |
static String |
PREFIX
The namespace prefix of this generator. |
Fields inherited from class org.apache.cocoon.generation.AbstractGenerator |
objectModel, resolver, source |
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer |
Fields inherited from interface org.apache.cocoon.generation.Generator |
ROLE |
Constructor Summary | |
RequestParameterGenerator()
Create a new RequestParameterGenerator instance. |
Method Summary | |
void |
generate()
Generate the content and send it down to the pipeline. |
Serializable |
getKey()
Generate the unique key. |
SourceValidity |
getValidity()
Generate (or return) the SourceValidity instance used to
possibly validate cached generations. |
void |
recycle()
Recycle this instance by wiping all locally held references. |
Methods inherited from class org.apache.cocoon.generation.AbstractGenerator |
setup |
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
setConsumer, setContentHandler, setLexicalHandler |
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 |
Methods inherited from interface org.apache.cocoon.xml.XMLProducer |
setConsumer |
Field Detail |
public static final String PREFIX
The namespace prefix of this generator.
Constructor Detail |
public RequestParameterGenerator()
Create a new RequestParameterGenerator
instance.
Method Detail |
public void recycle()
Recycle this instance by wiping all locally held references.
recycle
in interface Recyclable
recycle
in class AbstractGenerator
Recyclable.recycle()
public Serializable getKey()
Generate the unique key.
getKey
in interface CacheableProcessingComponent
null
if the component
is currently not cacheable.CacheableProcessingComponent.getKey()
public SourceValidity getValidity()
Generate (or return) the SourceValidity
instance used to
possibly validate cached generations.
getValidity
in interface CacheableProcessingComponent
SourceValidity
.CacheableProcessingComponent.getKey()
public void generate() throws ProcessingException, SAXException, IOException
Generate the content and send it down to the pipeline.
generate
in interface Generator
ProcessingException
SAXException
IOException
Generator.generate()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |