01: package biz.hammurapi.web.mda;
02:
03: import java.io.IOException;
04: import java.io.Writer;
05: import java.util.Comparator;
06:
07: public interface SubChannel extends Channel {
08: /**
09: * Sets part order. By default parts are ordered by their retrieval order. E.g. if part 'body'
10: * was requested before part 'body2' then it will be output before 'body2'.
11: * @param partNames
12: */
13: void setPartsComparator(Comparator partsComparator);
14:
15: /**
16: * Outputs all parts to writer and clears all attributtes.
17: * Channel shall not be used afer flush() is invoked.
18: * @param writer
19: * @throws IOException
20: */
21: void flush(Writer writer) throws IOException;
22:
23: /**
24: * @return Header writer. Header is output before any other parts.
25: */
26: Writer getHeader();
27:
28: /**
29: * @return Footer writer. Footer is output after any other parts.
30: */
31: Writer getFooter();
32:
33: }
|