How Mobile Channel works

There are four import components in BTT Mobile Channel:
  1. MobileAdapter

    Runs in client side. It is responsible for the interaction with BTT server application. Mobile application can interact with MobileAdapter instead of interacting with server directly.

  2. MobileRequestServlet

    Runs in server side. It is responsible for receiving request from client and sending response.

  3. MobileRequestHandler

    Runs in server side as request handler. It is responsible for processing request and invoking related operation.

  4. MobilePresentationHandler

    Runs in server side as presentation handler. It is responsible for processing response data.

The following diagram demonstrates the typical interaction with the Mobile Channel:

Screen capture showing the typical interaction with Mobile Channel

  1. When an eRCP application starts, MobileAdapter tries to establish session with BTT server.
  2. MobileRequestServlet redirects the session establishment request to MobileRequestHandler.
  3. MobileRequestHandler invokes the startup operation to establish session context.
  4. After the session is established, eRCP application can invoke BTT server operation through MobileAdapter.
  5. MobileRequestServlet redirects the request to MobileRequestHandler.
  6. MobileRequestHandler invokes the specified server operation.
  7. Server operation returns with result in server operation context.
  8. MobileRequestHandler invokes MobilePresentationHandler to process the result.
  9. MobileAdapter gets response from server side.

BTT Mobile Channel is a configurable component as the other BTT components.

You can cofigure requestHandler, presentationHandler and Startup Operation in btt.xml:
<kColl id="channelHandlers">
			<field id="initializer"
				value="com.ibm.btt.channel.ChannelInitializer" />

			<!-- 
			     BTT provides BTT mobile channels implementation
			     The configuration parameters:
			     1) requestHandler: BTT mobile request handler
			     2) presentationHandler: BTT mobile presentation handler
			     3) startUpOp : the start up operation to create session context, user needs provide
 this operation
			-->

			<kColl id="mobile">
				<field id="requestHandler" value="com.ibm.btt.mobile.MobileRequestHandler" />
				<field id="presentationHandler" value="com.ibm.btt.mobile.MobilePresentationHandler" />
				<field id="startUpOp" value="CreateSessionOperation" />
			</kColl>
		</kColl>