Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.infohazard.maverick.flow
Class LastStep  view LastStep download LastStep.java

java.lang.Object
  extended byorg.infohazard.maverick.flow.LastStep
All Implemented Interfaces:
TransformStep

class LastStep
extends java.lang.Object
implements TransformStep

Simple transformation step which dumps to the real output. There are NO subsequent steps! This is the end of the line.


Field Summary
private static org.apache.commons.logging.Log log
          Logger.
protected  MaverickContext mavCtx
           
 
Constructor Summary
LastStep(MaverickContext mctx)
           
 
Method Summary
 void done()
          This should be called after writing is complete.
 javax.servlet.http.HttpServletResponse getResponse()
          Must call done() when finished.
 org.xml.sax.ContentHandler getSAXHandler()
          Dumps directly to the real response
 java.io.Writer getWriter()
          Must call done() when finished.
 void go(java.io.Reader input)
          Writes the reader to the response.
 void go(javax.xml.transform.Source input)
          Serializes the XML Source to the response.
 void go(java.lang.String input)
          Writes the String to the response.
 boolean isLast()
          Your steps should always return false.
 void setContentType(java.lang.String contentType)
          Actually set this value, we are the last element in the chain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log
Logger.


mavCtx

protected MaverickContext mavCtx
Constructor Detail

LastStep

public LastStep(MaverickContext mctx)
Method Detail

isLast

public boolean isLast()
Description copied from interface: TransformStep
Your steps should always return false. The last step, which is not really a step at all - it's the real output stream, will return true.

Specified by:
isLast in interface TransformStep

setContentType

public void setContentType(java.lang.String contentType)
Actually set this value, we are the last element in the chain.

Specified by:
setContentType in interface TransformStep

getSAXHandler

public org.xml.sax.ContentHandler getSAXHandler()
                                         throws java.io.IOException,
                                                javax.servlet.ServletException
Dumps directly to the real response

Specified by:
getSAXHandler in interface TransformStep

getResponse

public javax.servlet.http.HttpServletResponse getResponse()
Description copied from interface: TransformStep
Must call done() when finished.

Specified by:
getResponse in interface TransformStep

getWriter

public java.io.Writer getWriter()
                         throws java.io.IOException,
                                javax.servlet.ServletException
Description copied from interface: TransformStep
Must call done() when finished.

Specified by:
getWriter in interface TransformStep

done

public void done()
          throws java.io.IOException,
                 javax.servlet.ServletException
Description copied from interface: TransformStep
This should be called after writing is complete.

Specified by:
done in interface TransformStep

go

public void go(javax.xml.transform.Source input)
        throws java.io.IOException,
               javax.servlet.ServletException
Serializes the XML Source to the response.

Specified by:
go in interface TransformStep

go

public void go(java.io.Reader input)
        throws java.io.IOException,
               javax.servlet.ServletException
Writes the reader to the response.

Specified by:
go in interface TransformStep

go

public void go(java.lang.String input)
        throws java.io.IOException,
               javax.servlet.ServletException
Writes the String to the response.

Specified by:
go in interface TransformStep