|
HATS 7.5.1 Web API ReferencePublicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.hats.web.runtime.WebResponse
public class WebResponse
Class Name: WebResponse Provides a generic response object by wrapping an HttpServletResponse object.
Class Type: Normal
Base Class: None
Intf Class: IResponse
Description:
| Constructor Summary | |
|---|---|
WebResponse(javax.servlet.http.HttpServletResponse theHttpServletResponse)
Create a wrapper for the HttpServletResponse object. |
|
| Method Summary | |
|---|---|
void |
addHeader(String name,
String value)
Adds a response header with the given name and value. |
String |
encodeRedirectURL(String theURL)
Encodes the specified URL for sendRedirect. |
String |
encodeURL(String theURL)
Encodes the specified URL. |
boolean |
equals(Object webResponse)
Compares the HttpServletResponse object contained within the specified object with the internal HttpServletResponse object. |
javax.servlet.http.HttpServletResponse |
getHttpServletResponse()
Get the httpServletResponse object wrapped by this object. |
OutputStream |
getOutputStream()
Returns a ServletOutputStream suitable for writing binary data in the response. |
int |
hashCode()
Returns the hash code. |
void |
sendRedirect(String theURL)
Sends a temporary redirect response to the client. |
void |
setContentLength(int i)
Sets the length of the content body in the response In HTTP servlets. |
void |
setContentType(String mimeType)
Sets the content type of the response being sent to the client. |
void |
setDateHeader(String name,
long date)
Sets a response header with the given name and date-value. |
void |
setHeader(String name,
String value)
Sets a response header with the given name and value. |
void |
setHttpServletResponse(javax.servlet.http.HttpServletResponse theHttpServletResponse)
Set the httpServletResponse that this object is wrapping. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WebResponse(javax.servlet.http.HttpServletResponse theHttpServletResponse)
theHttpServletResponse - The httpServletResponse object that needs to be wrapped. This value cannot be
null.
IllegalArgumentExeption - This exception is thrown if the input value is null.| Method Detail |
|---|
public String encodeURL(String theURL)
encodeURL in interface IResponsetheURL - The URL to encode if necessary.
HttpServletResponse.encodeURL(java.lang.String)public String encodeRedirectURL(String theURL)
encodeRedirectURL in interface IResponsetheURL - The URL to encode if necessary.
HttpServletResponse.encodeRedirectURL(java.lang.String)
public void sendRedirect(String theURL)
throws IOException
sendRedirect in interface IResponsetheURL - The redirect location URL.
IOExceptionHttpServletResponse.sendRedirect(java.lang.String)
public void setDateHeader(String name,
long date)
setDateHeader in interface IResponsename - The name of the header to set.date - The additional date value.HttpServletResponse.setDateHeader(java.lang.String, long)
public void setHeader(String name,
String value)
setHeader in interface IResponsename - The name of the header.value - The header value.HttpServletResponse.setHeader(java.lang.String, java.lang.String)
public void addHeader(String name,
String value)
addHeader in interface IResponsename - The name of the header.value - The additional header value.HttpServletResponse.addHeader(java.lang.String, java.lang.String)public javax.servlet.http.HttpServletResponse getHttpServletResponse()
public void setHttpServletResponse(javax.servlet.http.HttpServletResponse theHttpServletResponse)
theHttpServletResponse - The httpServletResponse object to wrap.
public OutputStream getOutputStream()
throws IOException
getOutputStream in interface IResponseIOExceptionServletResponse.getOutputStream()public void setContentLength(int i)
setContentLength in interface IResponsei - The lenght of the content body.ServletResponse.setContentLength(int)public void setContentType(String mimeType)
setContentType in interface IResponsemimeType - Specifies the content type for the response.ServletResponse.setContentType(java.lang.String)public int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object webResponse)
equals in class ObjectwebResponse - The WebResponse object used for compare.
Object.equals(java.lang.Object)
|
HATS 7.5.1 (201005110649) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||