org.apache.cocoon.samples
Class EventAwareReader

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.reading.AbstractReader
          extended by org.apache.cocoon.reading.ResourceReader
              extended by org.apache.cocoon.samples.EventAwareReader
All Implemented Interfaces:
Poolable, Recyclable, Component, Configurable, LogEnabled, CacheableProcessingComponent, Reader, SitemapModelComponent, SitemapOutputComponent

public class EventAwareReader
extends ResourceReader

Author:
Max Pfingsthorn (mpfingsthorn@hippo.nl)

Field Summary
 
Fields inherited from class org.apache.cocoon.reading.ResourceReader
bufferSize, byteRanges, configuredBufferSize, configuredByteRanges, configuredExpires, configuredQuickTest, expires, inputSource, quickTest, request, response
 
Fields inherited from class org.apache.cocoon.reading.AbstractReader
objectModel, out, parameters, resolver, source
 
Fields inherited from interface org.apache.cocoon.reading.Reader
ROLE
 
Constructor Summary
EventAwareReader()
           
 
Method Summary
 void generate()
          Generates the requested resource.
 Serializable getKey()
          Generate the unique key.
 SourceValidity getValidity()
          Generate the validity object.
 
Methods inherited from class org.apache.cocoon.reading.ResourceReader
configure, getLastModified, getMimeType, hasRanges, parameterize, processStream, recycle, setup, setupHeaders
 
Methods inherited from class org.apache.cocoon.reading.AbstractReader
setOutputStream, shouldSetContentLength
 
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
 

Constructor Detail

EventAwareReader

public EventAwareReader()
Method Detail

generate

public void generate()
              throws IOException,
                     ProcessingException
Description copied from class: ResourceReader
Generates the requested resource.

Specified by:
generate in interface Reader
Overrides:
generate in class ResourceReader
Throws:
IOException
ProcessingException

getKey

public Serializable getKey()
Description copied from class: ResourceReader
Generate the unique key. This key must be unique inside the space of this component.

Specified by:
getKey in interface CacheableProcessingComponent
Overrides:
getKey in class ResourceReader
Returns:
The generated key hashes the src

getValidity

public SourceValidity getValidity()
Description copied from class: ResourceReader
Generate the validity object.

Specified by:
getValidity in interface CacheableProcessingComponent
Overrides:
getValidity in class ResourceReader
Returns:
The generated validity object or null if the component is currently not cacheable.


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.