|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tapestry.portlet.PortletWebResponse
public class PortletWebResponse
Adapts PortletResponse
as
WebResponse
.
Constructor Summary | |
---|---|
PortletWebResponse(javax.portlet.PortletResponse portletResponse)
|
Method Summary | |
---|---|
String |
encodeURL(String url)
Encodes a URL, which adds information to the URL needed to ensure that the request triggered by the URL will be associated with the current session (if any). |
String |
getNamespace()
Returns the empty string. |
OutputStream |
getOutputStream(ContentType contentType)
Returns a output stream to which output should be sent. |
PrintWriter |
getPrintWriter(ContentType contentType)
Returns a PrintWriter to which output should be sent. |
void |
reset()
Unsupported. |
void |
sendError(int statusCode,
String message)
Unsupported. |
void |
setContentLength(int contentLength)
Unsupported. |
void |
setDateHeader(String string,
long date)
Unsupported. |
void |
setHeader(String name,
String value)
Unsupported. |
void |
setIntHeader(String name,
int value)
Unsupported. |
void |
setStatus(int status)
Unsupported. |
protected void |
unsupported(String methodName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PortletWebResponse(javax.portlet.PortletResponse portletResponse)
Method Detail |
---|
public OutputStream getOutputStream(ContentType contentType) throws IOException
WebResponse
getOutputStream
in interface WebResponse
contentType
- The encoding type that this outputstream will write content as.
IOException
- On io error.public PrintWriter getPrintWriter(ContentType contentType) throws IOException
WebResponse
PrintWriter
to which output should be sent. This method should be invoked
once on a response. A second call is expected to be so that an exception page can be
rendered, and the underlying request data is reset.
getPrintWriter
in interface WebResponse
contentType
- The type of content encoding the writer is for.
PrintWriter
instance.
IOException
- On io error.public String encodeURL(String url)
WebResponse
encodeURL
in interface WebResponse
url
- The URL to encode.
public void reset()
reset
in interface WebResponse
public void setContentLength(int contentLength)
setContentLength
in interface WebResponse
contentLength
- The total content length this response will write.public String getNamespace()
RenderWebResponse
subclass
actually provides a real value here.
getNamespace
in interface WebResponse
protected final void unsupported(String methodName)
public void setDateHeader(String string, long date)
setDateHeader
in interface WebResponse
string
- the name of the header to setdate
- the date value to set, in milliseconds since the epochpublic void setStatus(int status)
setStatus
in interface WebResponse
status
- The HTTP status code to set on the return header.public void setHeader(String name, String value)
setHeader
in interface WebResponse
name
- the name of the header to setvalue
- the value for the named headerpublic void setIntHeader(String name, int value)
setIntHeader
in interface WebResponse
name
- the name of the header to setvalue
- the value for the named headerpublic void sendError(int statusCode, String message) throws IOException
sendError
in interface WebResponse
statusCode
- The error status code to set on the header.message
- The message to give as the reason for error.
IOException
- on io error.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |