ResourceResponseWrapper provides a convenient
implementation of the ResourceResponse interface
that can be subclassed by developers.
This class implements the Wrapper or Decorator pattern.
Methods default to calling through to the wrapped response object.
ResourceResponse
| Access | Constructor and Description |
|---|---|
| public | ResourceResponseWrapper(ResourceResponse
the event response to wrap response)Creates an |
| Modifier and Type | Method and Description |
|---|---|
| public ResourceResponse | Returns: the wrapped responseOverrides javax. |
| public int | getStatus()
Implements javax.
Gets the current HTTP status code for the response.
|
| public void | setCharacterEncoding(String
a String specifying only the character set defined by
IANA Character Sets (http://www.iana.org/assignments/character-sets) charset)Implements javax. |
| public void | setContentLength(int
an integer specifying the length of the content being returned; sets the Content-Length header len)Implements javax. |
| public void | setContentLengthLong(long
a len)long specifying the length of the content being returned; sets the Content-Length headerImplements javax.
Sets the length of the content body in the response.
|
| public void | setLocale(Locale
the new locale of the response loc)Implements javax. |
| public void | |
| public void | setStatus(int
an integer specifying the status code for this request sc)Implements javax.
Sets the HTTP status code for this request.
|
| ResourceResponseWrapper | back to summary |
|---|---|
| public ResourceResponseWrapper(ResourceResponse response) Creates an
| |
| getResponse | back to summary |
|---|---|
| public ResourceResponse getResponse() Overrides javax. Return the wrapped response object.
| |
| getStatus | back to summary |
|---|---|
| public int getStatus() Implements javax. Doc from javax.
Gets the current HTTP status code for the response.
| |
| setCharacterEncoding | back to summary |
|---|---|
| public void setCharacterEncoding(String charset) Implements javax. Doc from javax. Sets the character encoding (MIME charset) of the response being
sent to the client, for example, to UTF-8. If the character encoding
has already been set by either the portlet container,
This method can be called repeatedly to change the character encoding. This method has no effect if it is called after getWriter has been called or after the response has been committed. | |
| setContentLength | back to summary |
|---|---|
| public void setContentLength(int len) Implements javax. Doc from javax. Sets the length of the content body in the response. This method has no effect if it is called after the response has been committed.
| |
| setContentLengthLong | back to summary |
|---|---|
| public void setContentLengthLong(long len) Implements javax. Doc from javax.
Sets the length of the content body in the response.
This method has no effect if it is called after the response has been committed.
| |
| setLocale | back to summary |
|---|---|
| public void setLocale(Locale loc) Implements javax. Doc from javax. Sets the locale of the response, setting the headers (including the Content-Type's charset) as appropriate. This method should be called before a call to getWriter(). By default, the response locale is the default locale provided by the portlet container. This method has no effect if it is called after the response has been committed. | |
| setResponse | back to summary |
|---|---|
| public void setResponse(ResourceResponse response) Sets the response object being wrapped.
| |
| setStatus | back to summary |
|---|---|
| public void setStatus(int sc) Implements javax. Doc from javax.
Sets the HTTP status code for this request.
The status code should be a valid value as defined in
IETF
rfc2616 "Hypertext Transfer Protocol -- HTTP/1.1"
. The status code constants "SC_*" defined in
This method has no effect if it is called after the response has been committed.
| |