com.ibm.btt.http
Class HttpChannelResponse
java.lang.Object
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
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
response
protected javax.servlet.http.HttpServletResponse response
HttpChannelResponse
public HttpChannelResponse(javax.servlet.http.HttpServletResponse response)
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
(c) Copyright IBM Corporation 1998, 2008