|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Response
| Nested Class Summary | |
|---|---|
static class |
Response.CacheControlResponse
|
static class |
Response.ContentEncoding
|
static class |
Response.ContentType
|
static class |
Response.Header
|
static class |
Response.Status
|
| Field Summary | |
|---|---|
static java.lang.String |
HTTP
|
static java.lang.String |
IMAGE_JPG
|
static java.lang.String |
MULTIPART
|
static java.lang.String |
XML
|
| Method Summary | |
|---|---|
void |
close()
|
java.lang.Long |
getContentLength()
|
java.lang.String |
getContentTypeHeader()
|
java.util.Map<java.lang.String,java.lang.String> |
getHeaders()
|
java.lang.String |
getNonStandardHeader(java.lang.String code)
|
java.io.OutputStream |
getOutputStream()
|
Response.Status |
getStatus()
|
void |
sendRedirect(java.lang.String url)
Will set the status to moved_temporaruly and set the location header to the given url |
void |
setAllowHeader(java.util.List<java.lang.String> methodsAllowed)
|
void |
setAuthenticateHeader(java.util.List<java.lang.String> challenges)
Must set multiple Authenticate headers, one for each challenge This will usually be one each for basic, digest, ntlm, etc Note that order might be significant to some clients, so should be preserved. |
void |
setCacheControlMaxAgeHeader(java.lang.Long deltaSeconds)
Set the cache control header to allow the resource to be cached for the given number of seconds |
void |
setCacheControlNoCacheHeader()
Set the cache control header to indicate that the resource should not be cached |
void |
setCacheControlPrivateMaxAgeHeader(java.lang.Long deltaSeconds)
|
void |
setContentEncodingHeader(Response.ContentEncoding encoding)
|
void |
setContentLengthHeader(java.lang.Long totalLength)
|
void |
setContentRangeHeader(long start,
long finish,
java.lang.Long totalLength)
|
void |
setContentTypeHeader(java.lang.String string)
|
Cookie |
setCookie(Cookie cookie)
The setCookie method is used to set a cookie value
with the cookie name. |
Cookie |
setCookie(java.lang.String name,
java.lang.String value)
The setCookie method is used to set a cookie value
with the cookie name. |
void |
setDateHeader(java.util.Date date)
|
void |
setDavHeader(java.lang.String string)
|
void |
setEtag(java.lang.String uniqueId)
|
void |
setExpiresHeader(java.util.Date expiresAt)
|
void |
setLastModifiedHeader(java.util.Date date)
|
void |
setLocationHeader(java.lang.String redirectUrl)
|
void |
setLockTokenHeader(java.lang.String tokenId)
|
void |
setNonStandardHeader(java.lang.String code,
java.lang.String value)
|
void |
setStatus(Response.Status status)
|
void |
setVaryHeader(java.lang.String string)
Sets the Vary response header, necessary for response compression |
| Field Detail |
|---|
static final java.lang.String HTTP
static final java.lang.String IMAGE_JPG
static final java.lang.String MULTIPART
static final java.lang.String XML
| Method Detail |
|---|
Response.Status getStatus()
java.util.Map<java.lang.String,java.lang.String> getHeaders()
java.lang.Long getContentLength()
void setContentEncodingHeader(Response.ContentEncoding encoding)
void setExpiresHeader(java.util.Date expiresAt)
void setLockTokenHeader(java.lang.String tokenId)
void setAuthenticateHeader(java.util.List<java.lang.String> challenges)
challenges - - a list of http authentication challengesvoid setStatus(Response.Status status)
void setEtag(java.lang.String uniqueId)
void setContentRangeHeader(long start,
long finish,
java.lang.Long totalLength)
void setContentLengthHeader(java.lang.Long totalLength)
void setContentTypeHeader(java.lang.String string)
java.lang.String getContentTypeHeader()
void setCacheControlMaxAgeHeader(java.lang.Long deltaSeconds)
deltaSeconds - - must not be nullvoid setCacheControlPrivateMaxAgeHeader(java.lang.Long deltaSeconds)
void setCacheControlNoCacheHeader()
void setLastModifiedHeader(java.util.Date date)
void setDavHeader(java.lang.String string)
void setNonStandardHeader(java.lang.String code,
java.lang.String value)
java.lang.String getNonStandardHeader(java.lang.String code)
void setAllowHeader(java.util.List<java.lang.String> methodsAllowed)
java.io.OutputStream getOutputStream()
void setLocationHeader(java.lang.String redirectUrl)
void setVaryHeader(java.lang.String string)
string - void setDateHeader(java.util.Date date)
void close()
void sendRedirect(java.lang.String url)
unencodedUrl - Cookie setCookie(Cookie cookie)
setCookie method is used to set a cookie value
with the cookie name. This will add a cookie to the response
stored under the name of the cookie, when this is committed it
will be added as a Set-Cookie header to the resulting response.
cookie - this is the cookie to be added to the response
Cookie setCookie(java.lang.String name,
java.lang.String value)
setCookie method is used to set a cookie value
with the cookie name. This will add a cookie to the response
stored under the name of the cookie, when this is committed it
will be added as a Set-Cookie header to the resulting response.
This is a convenience method that avoids cookie creation.
name - this is the cookie to be added to the responsevalue - this is the cookie value that is to be used
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||