biz.hammurapi.web.mda
Class MemorySubChannel

java.lang.Object
  extended bybiz.hammurapi.web.mda.AbstractChannel
      extended bybiz.hammurapi.web.mda.MemoryChannelBase
          extended bybiz.hammurapi.web.mda.MemorySubChannel
All Implemented Interfaces:
biz.hammurapi.util.Attributable, Channel, SubChannel

public class MemorySubChannel
extends MemoryChannelBase
implements SubChannel

Channel which uses StringWriter.

Author:
Pavel

Constructor Summary
MemorySubChannel()
           
 
Method Summary
 void flush(java.io.Writer writer)
          Outputs all parts to writer and clears all attributtes.
 java.io.Writer getFooter()
           
 java.io.Writer getHeader()
           
 void setPartsComparator(java.util.Comparator partsComparator)
          Sets part order.
 
Methods inherited from class biz.hammurapi.web.mda.MemoryChannelBase
createSubChannel, createWriter
 
Methods inherited from class biz.hammurapi.web.mda.AbstractChannel
getAttribute, getChannel, getChannel, getParts, getWriter, getWriter, removeAttribute, setAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface biz.hammurapi.web.mda.Channel
getChannel, getChannel, getParts, getWriter, getWriter
 
Methods inherited from interface biz.hammurapi.util.Attributable
getAttribute, removeAttribute, setAttribute
 

Constructor Detail

MemorySubChannel

public MemorySubChannel()
Method Detail

flush

public void flush(java.io.Writer writer)
           throws java.io.IOException
Description copied from interface: SubChannel
Outputs all parts to writer and clears all attributtes. Channel shall not be used afer flush() is invoked.

Specified by:
flush in interface SubChannel
Parameters:
writer -
Throws:
java.io.IOException

getFooter

public java.io.Writer getFooter()
Specified by:
getFooter in interface SubChannel
Returns:
Footer writer. Footer is output after any other parts.

getHeader

public java.io.Writer getHeader()
Specified by:
getHeader in interface SubChannel
Returns:
Header writer. Header is output before any other parts.

setPartsComparator

public void setPartsComparator(java.util.Comparator partsComparator)
Description copied from interface: SubChannel
Sets part order. By default parts are ordered by their retrieval order. E.g. if part 'body' was requested before part 'body2' then it will be output before 'body2'.

Specified by:
setPartsComparator in interface SubChannel


Copyright © 2006 Hammurapi Group. All Rights Reserved.