biz.hammurapi.web.mda
Class AbstractChannel

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

public abstract class AbstractChannel
extends java.lang.Object
implements Channel

Channel which uses StringWriter.

Author:
Pavel

Constructor Summary
AbstractChannel()
           
 
Method Summary
protected abstract  SubChannel createSubChannel()
          Creates new sub-channel.
protected abstract  java.io.Writer createWriter()
          Creates new Writer
 java.lang.Object getAttribute(java.lang.Object name)
           
 SubChannel getChannel(java.lang.String partName)
           
 SubChannel getChannel(java.lang.String[] path)
           
 java.util.Map getParts()
           
 java.io.Writer getWriter(java.lang.String partName)
           
 java.io.Writer getWriter(java.lang.String[] path)
           
 java.lang.Object removeAttribute(java.lang.Object name)
           
 void setAttribute(java.lang.Object name, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractChannel

public AbstractChannel()
Method Detail

getChannel

public SubChannel getChannel(java.lang.String partName)
                      throws java.lang.IllegalStateException
Specified by:
getChannel in interface Channel
Returns:
Part sub-channel to output generated code
Throws:
java.lang.IllegalStateException - If writer for this part has already been retrieved.

createSubChannel

protected abstract SubChannel createSubChannel()
Creates new sub-channel.

Returns:

createWriter

protected abstract java.io.Writer createWriter()
Creates new Writer

Returns:

getChannel

public SubChannel getChannel(java.lang.String[] path)
Specified by:
getChannel in interface Channel
Parameters:
path - Parts path.
Returns:
Channel by path

getWriter

public java.io.Writer getWriter(java.lang.String partName)
                         throws java.lang.IllegalStateException
Specified by:
getWriter in interface Channel
Returns:
Part writer to output generated code
Throws:
java.lang.IllegalStateException - If channel for this part has already been retrieved.

getWriter

public java.io.Writer getWriter(java.lang.String[] path)
Specified by:
getWriter in interface Channel
Parameters:
path - Parts path.
Returns:
Writer by path

getAttribute

public java.lang.Object getAttribute(java.lang.Object name)
Specified by:
getAttribute in interface biz.hammurapi.util.Attributable

removeAttribute

public java.lang.Object removeAttribute(java.lang.Object name)
Specified by:
removeAttribute in interface biz.hammurapi.util.Attributable

setAttribute

public void setAttribute(java.lang.Object name,
                         java.lang.Object value)
Specified by:
setAttribute in interface biz.hammurapi.util.Attributable

getParts

public java.util.Map getParts()
Specified by:
getParts in interface Channel
Returns:
Map of parts.


Copyright © 2006 Hammurapi Group. All Rights Reserved.