org.benow.web.path.page.stream
Class StreamTagProcessor

java.lang.Object
  extended by org.benow.web.path.page.TagProcessor
      extended by org.benow.web.path.page.stream.StreamingTagProcessor
          extended by org.benow.web.path.page.stream.StreamTagProcessor
All Implemented Interfaces:
PostProcessor

public class StreamTagProcessor
extends StreamingTagProcessor

A tag processor which streams from the instance of a specified ResultWriter. The specified class is instantiated and used to stream to the servlet output. This can be used to stream large amounts of data, deep data, etc.

An example of the tag which would stream from a given class instance is:

      <stream class="ca.reachable.tv.listings.GridStreamer2"/>
   
Exceptions within the streamer can be caught and formatted, or otherwise handled within a template within the calling xsl template:
      <stream class="ca.reachable.tv.listings.GridStreamer2">
          <on exception="NoListingsException" op="noListings"/>
      </stream>
 
If an error occurs, and there is no associated catch, the default error presenter is used to nicely display the error.

Author:
andy

Field Summary
 
Fields inherited from class org.benow.web.path.page.TagProcessor
RES_TAG, tag
 
Constructor Summary
StreamTagProcessor()
           
 
Method Summary
 void stream(java.io.PrintWriter out, org.w3c.dom.Element streamElem, QueryParams params, org.benow.xml.xsl.XSL src)
           
 
Methods inherited from class org.benow.web.path.page.TagProcessor
getTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamTagProcessor

public StreamTagProcessor()
Method Detail

stream

public void stream(java.io.PrintWriter out,
                   org.w3c.dom.Element streamElem,
                   QueryParams params,
                   org.benow.xml.xsl.XSL src)
            throws java.lang.Throwable
Specified by:
stream in class StreamingTagProcessor
Parameters:
out - where to stream to
streamElem - input stream element that may hold param for stream procedure
params - params at time of stream
Throws:
java.lang.Throwable
WebException - if something goes wrong
java.io.IOException