AbstractResponseAdapter, BasicResponseAdapter, QuartzJobResponseAdapterpublic interface ResponseAdapter
| Modifier and Type | Method | Description |
|---|---|---|
void |
addHeader(java.lang.String name,
java.lang.String value) |
Add the given single header value to the current list of values
for the given header.
|
boolean |
containsHeader(java.lang.String name) |
Returns a boolean indicating whether the named response header
has already been set.
|
void |
flush() |
|
<T> T |
getAdaptee() |
Returns the adaptee object to provide response information.
|
java.lang.String |
getContentType() |
Returns the content type used for the MIME body sent in this response.
|
java.lang.String |
getEncoding() |
Returns the name of the character encoding (MIME charset) used for the body
sent in this response.
|
java.lang.String |
getHeader(java.lang.String name) |
Returns the value of the response header with the given name.
|
java.util.Collection<java.lang.String> |
getHeaderNames() |
Returns the names of the headers of this response.
|
MultiValueMap<java.lang.String,java.lang.String> |
getHeaders() |
Returns a map of the request headers that can be modified.
|
java.util.Collection<java.lang.String> |
getHeaders(java.lang.String name) |
Returns the values of the response header with the given name.
|
java.io.OutputStream |
getOutputStream() |
Returns a
OutputStream suitable for writing binary data in the response. |
int |
getStatus() |
Returns the status code.
|
java.io.Writer |
getWriter() |
Returns a
Writer object that can send character text to the client. |
java.lang.String |
redirect(RedirectResponseRule redirectResponseRule) |
Redirects a client to a new URL.
|
void |
redirect(java.lang.String target) |
Redirects a client to a new URL.
|
void |
setContentType(java.lang.String contentType) |
Sets the content type of the response being sent to the client,
if the response has not been committed yet.
|
void |
setEncoding(java.lang.String encoding) |
Sets the character encoding of the response being sent to the client.
|
void |
setHeader(java.lang.String name,
java.lang.String value) |
Set the given single header value under the given header name.
|
void |
setStatus(int status) |
Sets the status code.
|
MultiValueMap<java.lang.String,java.lang.String> |
touchHeaders() |
Returns a map of the request headers that can be modified.
|
<T> T getAdaptee()
T - the type of the adaptee objectjava.lang.String getEncoding()
String specifying the name of the character encoding,
for example, UTF-8void setEncoding(java.lang.String encoding)
throws java.io.UnsupportedEncodingException
encoding - a String specifying only the character set
defined by IANA Character Sets (http://www.iana.org/assignments/character-sets)java.io.UnsupportedEncodingException - if character encoding is not supportedjava.lang.String getContentType()
String specifying the content type,
for example, text/html, or nullvoid setContentType(java.lang.String contentType)
contentType - a String specifying the MIME type of the contentjava.io.OutputStream getOutputStream()
throws java.io.IOException
OutputStream suitable for writing binary data in the response.OutputStream for writing binary datajava.io.IOException - if an input or output exception occursjava.io.Writer getWriter()
throws java.io.IOException
Writer object that can send character text to the client.Writer object that can return character data to the clientjava.io.IOException - if an input or output exception occursvoid redirect(java.lang.String target)
throws java.io.IOException
target - the redirect targetjava.io.IOException - if an input or output exception occursjava.lang.String redirect(RedirectResponseRule redirectResponseRule) throws java.io.IOException
redirectResponseRule - the redirect response rulejava.io.IOException - if an input or output exception occursMultiValueMap<java.lang.String,java.lang.String> touchHeaders()
MultiValueMap object, may not be nullMultiValueMap<java.lang.String,java.lang.String> getHeaders()
MultiValueMap object, may be nulljava.lang.String getHeader(java.lang.String name)
If a response header with the given name exists and contains multiple values, the value that was added first will be returned.
name - the name of the response header whose value to returnnull if no header with the given name has been set
on this responsejava.util.Collection<java.lang.String> getHeaders(java.lang.String name)
name - the name of the response header whose values to returnCollection of the values
of the response header with the given namejava.util.Collection<java.lang.String> getHeaderNames()
Collection of the names
of the headers of this responseboolean containsHeader(java.lang.String name)
name - the header nametrue if the named response header
has already been set; false otherwisevoid setHeader(java.lang.String name,
java.lang.String value)
name - the header namevalue - the header value to setvoid addHeader(java.lang.String name,
java.lang.String value)
name - the header namevalue - the header value to be addedint getStatus()
void setStatus(int status)
status - the status codevoid flush()
Copyright © 2008–2018 The Aspectran Project. All rights reserved.