IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.http
Class HttpChannelRequest

java.lang.Object
  extended by com.ibm.btt.channel.BTTChannelRequest
      extended by com.ibm.btt.http.HttpChannelRequest
All Implemented Interfaces:
ChannelRequest
Direct Known Subclasses:
ExtendHttpChannelRequest, JavaHttpChannelRequest, MobileRequest, SMSChannelRequest, XmlHttpChannelRequest

public class HttpChannelRequest
extends BTTChannelRequest

The channel request used to wrap the HttpServletRequest.


Field Summary
protected  javax.servlet.http.HttpServletRequest request
           
 
Fields inherited from class com.ibm.btt.channel.BTTChannelRequest
log
 
Constructor Summary
HttpChannelRequest(javax.servlet.http.HttpServletRequest request)
          Construct the HttpChannelRequest
 
Method Summary
protected  void checkSession(ChannelContext channelContext)
          Check the session is established or not
 java.lang.Object getAttribute(java.lang.String name)
          Get the attribute value from the request
 java.lang.String getCharacterEncoding()
           
 java.lang.Object getRequest()
          The channel request is a wrapper, so you can use this to get the underlying request object
 java.lang.String getSessionId(ChannelContext channelContext)
          Get the session id
 java.lang.String getUserType(ChannelContext channelContext)
          Get the user type of the channel, this is used to determine the client type.
 void parseRequestData(ChannelContext channelContext)
          Parses the contents of the parameters contained in the HttpServletRequest, parses the request data into the KeyedCollection, and adds the kColl into the ChannelContext request data.
 void parseRequestHeader(ChannelContext channelContext)
          Parses the contents of the header contained in the HttpServletRequest, parses the request header into the KeyedCollection, and adds the kColl into the ChannelContext request data.
 void preProcessRequest(ChannelContext channelContext)
          Performs any session management/control required at the device level.
 void setAttribute(java.lang.String attribute, java.lang.Object value)
          Set the attribute value of the request
 void setCharacterEncoding(java.lang.String encoding)
          Set the character encoding of the request and the response
 
Methods inherited from class com.ibm.btt.channel.BTTChannelRequest
runInSession, usingCookies
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

request

protected javax.servlet.http.HttpServletRequest request
Constructor Detail

HttpChannelRequest

public HttpChannelRequest(javax.servlet.http.HttpServletRequest request)
Construct the HttpChannelRequest

Parameters:
request - HttpServletRequest object
Method Detail

getUserType

public java.lang.String getUserType(ChannelContext channelContext)
Get the user type of the channel, this is used to determine the client type. So the channel driver use this to determine which channel the request is from.

Parameters:
channelContext - the channel context object
Returns:
the user type of the client

parseRequestData

public void parseRequestData(ChannelContext channelContext)
                      throws java.lang.Exception
Parses the contents of the parameters contained in the HttpServletRequest, parses the request data into the KeyedCollection, and adds the kColl into the ChannelContext request data.

Override this method to modify the the data parsing behavior.

Parameters:
channelContext - the channel context object
Throws:
java.lang.Exception - if error occur during parsing

parseRequestHeader

public void parseRequestHeader(ChannelContext channelContext)
                        throws java.lang.Exception
Parses the contents of the header contained in the HttpServletRequest, parses the request header into the KeyedCollection, and adds the kColl into the ChannelContext request data.

Override this method to modify the the data parsing behavior.

Parameters:
channelContext - the channel context object
Throws:
java.lang.Exception - if error occur during parsing

preProcessRequest

public void preProcessRequest(ChannelContext channelContext)
                       throws DSECSSessionNotEstablishedException
Performs any session management/control required at the device level. This method inserts the channel session into the ChannelContext and must provide support for using cookies and hidden form field to manage the session.

Parameters:
channelContext - the channel context object
Throws:
DSECSSessionNotEstablishedException - Thrown if the session has expired

checkSession

protected void checkSession(ChannelContext channelContext)
                     throws DSECSSessionNotEstablishedException
Check the session is established or not

Parameters:
channelContext - the channel context object
Throws:
DSECSSessionNotEstablishedException - if session isn't established

getSessionId

public java.lang.String getSessionId(ChannelContext channelContext)
Get the session id

Parameters:
channelContext - the channel context object
Returns:
the session id

setAttribute

public void setAttribute(java.lang.String attribute,
                         java.lang.Object value)
Set the attribute value of the request

Parameters:
attribute - the attribute name
value - the attribute value

getCharacterEncoding

public java.lang.String getCharacterEncoding()
Returns:
the character encoding of the request and the response

getRequest

public java.lang.Object getRequest()
The channel request is a wrapper, so you can use this to get the underlying request object

Returns:
the underlying the request object

setCharacterEncoding

public void setCharacterEncoding(java.lang.String encoding)
                          throws java.io.UnsupportedEncodingException
Set the character encoding of the request and the response

Parameters:
encoding - the character encoding
Throws:
java.io.UnsupportedEncodingException - if the encoding isn't supported

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Get the attribute value from the request

Parameters:
name - the attribute name
Returns:
the attribute value

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011