IBM Bank Transformation Toolkit Javadoc

com.ibm.btt.http
Class HttpChannelResponse

java.lang.Object
  extended by com.ibm.btt.http.HttpChannelResponse
All Implemented Interfaces:
ChannelResponse
Direct Known Subclasses:
JavaAssignChannelResponse, JavaProtocolChannelResponse, JSONHttpChannelResponse, XmlHttpChannelResponse

public class HttpChannelResponse
extends java.lang.Object
implements ChannelResponse


Field Summary
protected  javax.servlet.http.HttpServletResponse response
           
 
Constructor Summary
HttpChannelResponse(javax.servlet.http.HttpServletResponse response)
           
 
Method Summary
 void addCookie(java.lang.String name, java.lang.String value)
           
 java.lang.String getCharacterEncoding()
           
 java.io.OutputStream getOutputStream()
           
 java.lang.Object getResponse()
           
 void handleServerException(ChannelContext channelContext, java.lang.Exception e)
          Convenience method to ensure that a response is returned to the client for the case where no presentation handler exists or because the server is not initialized.
 void sendResult(ChannelContext channelContext, java.lang.String result)
           
 void setCharacterEncoding(java.lang.String encoding)
           
 void setContentLength(int length)
           
 void setContentType(java.lang.String contentType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

response

protected javax.servlet.http.HttpServletResponse response
Constructor Detail

HttpChannelResponse

public HttpChannelResponse(javax.servlet.http.HttpServletResponse response)
Method Detail

handleServerException

public void handleServerException(ChannelContext channelContext,
                                  java.lang.Exception e)
                           throws java.lang.Exception
Convenience method to ensure that a response is returned to the client for the case where no presentation handler exists or because the server is not initialized. This implementation is trying to reply to an Web client.

Specified by:
handleServerException in interface ChannelResponse
Parameters:
e - exception object
Throws:
java.lang.Exception - The exception description.

sendResult

public void sendResult(ChannelContext channelContext,
                       java.lang.String result)
                throws java.lang.Exception
Specified by:
sendResult in interface ChannelResponse
Throws:
java.lang.Exception

getCharacterEncoding

public java.lang.String getCharacterEncoding()
Specified by:
getCharacterEncoding in interface ChannelResponse

getResponse

public java.lang.Object getResponse()
Specified by:
getResponse in interface ChannelResponse

setCharacterEncoding

public void setCharacterEncoding(java.lang.String encoding)
                          throws java.io.UnsupportedEncodingException
Specified by:
setCharacterEncoding in interface ChannelResponse
Throws:
java.io.UnsupportedEncodingException

addCookie

public void addCookie(java.lang.String name,
                      java.lang.String value)
Specified by:
addCookie in interface ChannelResponse

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Specified by:
getOutputStream in interface ChannelResponse
Throws:
java.io.IOException

setContentLength

public void setContentLength(int length)
Specified by:
setContentLength in interface ChannelResponse

setContentType

public void setContentType(java.lang.String contentType)
Specified by:
setContentType in interface ChannelResponse

IBM Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2008