|
|||||||||||
| 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.reading.AbstractReader
A reader can be used to generate binary output for a request. This abstract class helps in implementing a custom reader.
| Field Summary | |
protected Map |
objectModel
The current Map of the object model. |
protected OutputStream |
out
The OutputStream to write on. |
protected Parameters |
parameters
The current Parameters. |
protected SourceResolver |
resolver
The current SourceResolver. |
protected String |
source
The source URI associated with the request or null. |
| Fields inherited from interface org.apache.cocoon.reading.Reader |
ROLE |
| Constructor Summary | |
AbstractReader()
|
|
| Method Summary | |
long |
getLastModified()
|
String |
getMimeType()
Get the mime-type of the output of this Reader
This default implementation returns null to indicate that the
mime-type specified in the sitemap is to be used |
void |
recycle()
Recycle the component |
void |
setOutputStream(OutputStream out)
Set the OutputStream |
void |
setup(SourceResolver resolver,
Map objectModel,
String src,
Parameters par)
Set the SourceResolver the object model Map,
the source and sitemap Parameters used to process the request. |
boolean |
shouldSetContentLength()
Test if the component wants to set the content length |
| 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.reading.Reader |
generate |
| Field Detail |
protected SourceResolver resolver
SourceResolver.
protected Map objectModel
Map of the object model.
protected Parameters parameters
Parameters.
protected String source
protected OutputStream out
OutputStream to write on.
| Constructor Detail |
public AbstractReader()
| Method Detail |
public void setup(SourceResolver resolver,
Map objectModel,
String src,
Parameters par)
throws ProcessingException,
SAXException,
IOException
SourceResolver the object model Map,
the source and sitemap Parameters used to process the request.
setup in interface SitemapModelComponentresolver - The SourceResolver to find resources within your context.objectModel - A java.util.Map that contains the request and session information.src - The value of the "src" attribute in the sitemap.par - The sitemap parameters passed into your component.
ProcessingException - if there is any other unexpected problem.
IOException - if there is a problem reading files.
SAXException - if there is a problem reading a SAX stream.public void setOutputStream(OutputStream out)
OutputStream
setOutputStream in interface SitemapOutputComponentout - The OutputStream target for the rendered results.public String getMimeType()
Reader
This default implementation returns null to indicate that the
mime-type specified in the sitemap is to be used
getMimeType in interface SitemapOutputComponentpublic long getLastModified()
getLastModified in interface Readerpublic void recycle()
recycle in interface Recyclablepublic boolean shouldSetContentLength()
shouldSetContentLength in interface SitemapOutputComponenttrue if the content length needs to be set.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||