It is required to initialize BTT channel handler component before
using the channel framework:
<kColl id="channelHandlers">
<field id="initializer" value="com.ibm.btt.channel.ChannelInitializer" />
<!-- Web 2.0 clients and use XML as data format -->
<kColl id="web2_xml">
<field id="requestHandler" value="com.ibm.btt.channel.Web2RequestHandler" />
<field id="presentationHandler" value="com.ibm.btt.channel.Web2PresentationHandler" />
<field id="processor" value="com.ibm.btt.channel.BTTMessageProcessor" />
<field id="cookies" value="false" />
<field id="runInSession" value="true" />
<field id="requestContext" value="XmlChannelContext" />
<field id="dataFormatter" value="XmlChannelFormatter" />
<field id="replyContext" value="XmlReplyContext" />
<field id="replyFormatter" value="XmlReplyFormatter" />
<field id="sessionReplyContext" value="XmlSessionReplyContext" />
<field id="sessionReplyFormatter" value="XmlSessionReplyFormatter" />
</kColl>
<! -- Web 2.0 clients and use JSON as data format -->
<kColl id="web2_json">
<field id="requestHandler" value="com.ibm.btt.channel.Web2RequestHandler" />
<field id="presentationHandler" value="com.ibm.btt.channel.Web2PresentationHandler" />
<field id="processor" value="com.ibm.btt.channel.BTTMessageProcessor" />
<field id="cookies" value="false" />
<field id="runInSession" value="true" />
<field id="requestContext" value="JSONChannelContext" />
<field id="dataFormatter" value="JSONChannelFormatter" />
<field id="replyContext" value="JSONReplyContext" />
<field id="replyFormatter" value="JSONReplyFormatter" />
<field id="sessionReplyContext" value="JSONSessionReplyContext" />
<field id="sessionReplyFormatter" value="JSONSessionReplyFormatter" />
</kColl>
</kColl>
Where:
- Class com.ibm.btt.channel.ChannelInitializer is used
to initialize channel handler.
- Class com.ibm.btt.channel.Web2RequestHandler is the BTT
provided implementation for the request handler.
- Class com.ibm.btt.channel.Web2PresentationHandler is
the BTT provided implementation for presentation handler.
- Class com.ibm.btt.channel.BTTMessageProcessor is the
BTT provided implementation for message processor.
- Cookies is used to define whether or not to use cookies
for http session management.
- BTT channel framework supports stateful and stateless programming model.
Stateful programming model uses session management to keep client information
and stateless programming model does not keep client information in the server
side. The attribute runInSession is used to define which
programming model is used. If the value is true, then the server side is in
the stateful programming model.
- The attributes requestContext, dataFormatter, replyContext, replyFormatter, sessionReplyContext and SessionReplyFormatter are
used to define the request data structures. See Defining the request data format.