org.apache.cocoon.producer
Class AbstractProducer

java.lang.Object
  |
  +--org.apache.cocoon.framework.AbstractActor
        |
        +--org.apache.cocoon.producer.AbstractProducer
Direct Known Subclasses:
DummyProducer, FileProducer

public abstract class AbstractProducer
extends AbstractActor
implements Producer

This abstract class implements the Producer interface and provides utitity methods to convert the generated streams into DOM tress that are used inside the processor pipeline. This class must be seen as a transparent "mediator" between stream and DOM realms.

Version:
$Revision: 1.3 $ $Date: 1999/10/21 22:04:54 $
Author:
Stefano Mazzocchi

Fields inherited from class org.apache.cocoon.framework.AbstractActor
director
 
Constructor Summary
AbstractProducer()
           
 
Method Summary
 org.w3c.dom.Document getDocument(javax.servlet.http.HttpServletRequest request)
          This method is the only one called by the Cocoon engine.
 boolean hasChanged(java.lang.Object request)
          This method always returns true to reduce the evaluation overhead to a minimum.
 
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
 

Constructor Detail

AbstractProducer

public AbstractProducer()
Method Detail

getDocument

public org.w3c.dom.Document getDocument(javax.servlet.http.HttpServletRequest request)
                                 throws java.lang.Exception
This method is the only one called by the Cocoon engine. Producers are allowed to create streams and this class "mediates" translating these streams into DOM trees. For producers willing to generate DOM trees automatically, they should override this method and may well ignore to implement the getStream() method since it's never called directly by Cocoon.
Specified by:
getDocument in interface Producer

hasChanged

public boolean hasChanged(java.lang.Object request)
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.


Copyright 1999 Java Apache Project. All Rights Reserved.