org.apache.cocoon.producer
Class FileProducer

java.lang.Object
  |
  +--org.apache.cocoon.framework.AbstractActor
        |
        +--org.apache.cocoon.producer.AbstractProducer
              |
              +--org.apache.cocoon.producer.FileProducer

public class FileProducer
extends AbstractProducer
implements Status

This class implements the producer interface in order to produce a document based on the path provided as "PathTranslated". This should work on most of the servlet engine available.

Version:
$Revision: 1.6 $ $Date: 1999/09/13 20:29:00 $
Author:
Stefano Mazzocchi

Field Summary
private  Monitor monitor
           
 
Fields inherited from class org.apache.cocoon.framework.AbstractActor
director
 
Constructor Summary
FileProducer()
           
 
Method Summary
private  java.lang.String getBasename(javax.servlet.http.HttpServletRequest request)
           
 java.lang.String getPath(javax.servlet.http.HttpServletRequest request)
          Returns the path where the resource is found, or an empty string if no path can be applied to the resource.
 java.lang.String getStatus()
          Returns information about the status of the implementing class.
 java.io.Reader getStream(javax.servlet.http.HttpServletRequest request)
          This method is responsible to provide an input stream to read the data generated or contained by the resource mapped by this document producer.
 boolean hasChanged(java.lang.Object context)
          This method always returns true to reduce the evaluation overhead to a minimum.
 
Methods inherited from class org.apache.cocoon.producer.AbstractProducer
getDocument
 
Methods inherited from class org.apache.cocoon.framework.AbstractActor
init
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

monitor

private Monitor monitor
Constructor Detail

FileProducer

public FileProducer()
Method Detail

getStream

public java.io.Reader getStream(javax.servlet.http.HttpServletRequest request)
                         throws java.io.IOException
Description copied from interface: Producer
This method is responsible to provide an input stream to read the data generated or contained by the resource mapped by this document producer. This stream is not guaranteed to be buffered.

getPath

public java.lang.String getPath(javax.servlet.http.HttpServletRequest request)
Description copied from interface: Producer
Returns the path where the resource is found, or an empty string if no path can be applied to the resource. Warning, null values are not valid.

hasChanged

public boolean hasChanged(java.lang.Object context)
Description copied from class: AbstractProducer
This method always returns true to reduce the evaluation overhead to a minimum. Producer are highly encouradged to overwrite this method if they can provide a fast way to evaluate the response change.
Overrides:
hasChanged in class AbstractProducer

getBasename

private java.lang.String getBasename(javax.servlet.http.HttpServletRequest request)

getStatus

public java.lang.String getStatus()
Description copied from interface: Status
Returns information about the status of the implementing class. Note: this is use instead of the usual toString() method because some of these methods are declared final in some classes in JDK 1.1.
Specified by:
getStatus in interface Status


Copyright 1999 Java Apache Project. All Rights Reserved.