|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.openfoundation.web.XPResponse
public class XPResponse
An XPResponse is an implementation of IXPResponse and provides Similar functionality equivalent to HttpServletResponse.
Constructor Summary | |
---|---|
XPResponse(HttpServletResponse response)
Creates a XPResponse Object from a given HttpServletResponse. |
Method Summary | |
---|---|
void |
AddCookie(XPCookie cookie)
Adds the specified cookie to the response. |
void |
AddHeader(java.lang.String name,
java.lang.String _value)
Adds a response header with the given name and value. |
void |
Clear()
Clears any data that exists in the buffer as well as the status code and headers. |
void |
ClearUnderlyingObject()
This method clears all the instance variables to avoid memory leak. |
java.lang.String |
EncodeRedirectURL(java.lang.String url)
Deprecated. This method is deprecated because Redirect() method already encodes url |
void |
Flush()
This method writes all data to the client. |
java.lang.String |
GetCharacterEncoding()
Returns the name of the charset used for the MIME body sent in this response If no charset has been assigned, it is implicitly set to ISO-8859-1 (Latin-1). |
XPOutputStream |
GetOutputStream()
This method returns an output stream for writing binary data to the client. |
HttpServletResponse |
GetUnderlyingObject()
Returns underlying HttpServletResponse object. |
void |
Redirect(java.lang.String url)
Sends a temporary redirect response to the client using the specified redirect location URL. |
void |
SetContentType(java.lang.String type)
Sets the content type of the response being sent to the client. |
void |
SetDateHeader(java.lang.String name,
long date)
Sets a response header with the given name and date-value. |
void |
SetStatus(int sc)
Sets the status code for this response. |
void |
SetStatus(int sc,
java.lang.String msg)
Sets the status code and message for this response. |
void |
Write(char c)
This method writes a character to the client. |
void |
Write(char[] s)
This method writes an array of characters to the client. |
void |
Write(java.lang.Object o)
This method writes an object to the client. |
void |
Write(java.lang.String s)
This method writes a string to the client. |
void |
WriteLine(char c)
This method writes a character followed by an end of line to the client. |
void |
WriteLine(char[] s)
This method writes an array of characters followed by an end of line to the client. |
void |
WriteLine(java.lang.Object o)
This method writes an object followed by an end of line to the client. |
void |
WriteLine(java.lang.String s)
This method writes a string followed by an end of line to the client. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XPResponse(HttpServletResponse response)
response
- HttpServletResponse Object to be wrapped.Method Detail |
---|
public void Flush()
Flush
in interface IXPResponse
public XPOutputStream GetOutputStream()
GetOutputStream
in interface IXPResponse
public java.lang.String GetCharacterEncoding()
GetCharacterEncoding
in interface IXPResponse
public void Clear()
Clear
in interface IXPResponse
public void SetContentType(java.lang.String type)
SetContentType
in interface IXPResponse
type
- - content type to be sent.public void SetDateHeader(java.lang.String name, long date)
SetDateHeader
in interface IXPResponse
name
- - a String containing name of the Date header.date
- - a long containing date in milliseconds since EPOCH.
Use XPDateTime.GetTimeInMilliseconds() to produce a commensurate value.public void AddCookie(XPCookie cookie)
AddCookie
in interface IXPResponse
cookie
- the XPCookie object to add to the response.public java.lang.String EncodeRedirectURL(java.lang.String url)
EncodeRedirectURL
in interface IXPResponse
url
- url string to be encoded.
public void AddHeader(java.lang.String name, java.lang.String _value)
AddHeader
in interface IXPResponse
name
- - name of the header to be set_value
- - value of the header to be setpublic void Redirect(java.lang.String url)
Redirect
in interface IXPResponse
url
- - the redirect location urlpublic void SetStatus(int sc)
SetStatus
in interface IXPResponse
sc
- - the status code.public void SetStatus(int sc, java.lang.String msg)
SetStatus
in interface IXPResponse
sc
- - the status code.msg
- - the status msg.public void Write(char c)
Write
in interface IXPResponse
c
- - the character to be written.public void Write(java.lang.Object o)
Write
in interface IXPResponse
o
- - the object to be written.public void Write(java.lang.String s)
Write
in interface IXPResponse
s
- - the String to be written.public void Write(char[] s)
Write
in interface IXPResponse
s
- - the arry of characters to be written.public void WriteLine(char c)
WriteLine
in interface IXPResponse
c
- - the character to be written.public void WriteLine(java.lang.Object o)
WriteLine
in interface IXPResponse
o
- - the object to be written.public void WriteLine(java.lang.String s)
WriteLine
in interface IXPResponse
s
- - the String to be written.public void WriteLine(char[] s)
WriteLine
in interface IXPResponse
s
- - the arry of characters to be written.public HttpServletResponse GetUnderlyingObject()
public void ClearUnderlyingObject()
ClearUnderlyingObject
in interface IXPResponse
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |