|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.abdera.protocol.server.context.ResponseContextWrapper
public class ResponseContextWrapper
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.abdera.protocol.Response |
|---|
Response.ResponseType |
| Field Summary | |
|---|---|
protected ResponseContext |
response
|
| Fields inherited from interface org.apache.abdera.protocol.util.ProtocolConstants |
|---|
NOCACHE, NOSTORE, NOTRANSFORM, ONLYIFCACHED, PRIVATE, PROXYREVALIDATE, PUBLIC, REVALIDATE |
| Constructor Summary | |
|---|---|
ResponseContextWrapper(ResponseContext response)
|
|
| Method Summary | |
|---|---|
ResponseContext |
addEncodedHeader(String name,
String charset,
String value)
Add an RFC 2047 encoded header in the response |
ResponseContext |
addEncodedHeaders(String name,
String charset,
String... vals)
Add an RFC 2047 encoded header in the response |
ResponseContext |
addHeader(String name,
Object value)
Add a header to the response |
ResponseContext |
addHeaders(String name,
Object... vals)
Add a header to the response |
long |
getAge()
Get the age of this response as specified by the server |
String |
getAllow()
Get the value of the Allow response header |
String |
getCacheControl()
Return the value of the Cache-Control header |
String |
getContentLanguage()
Return the value of the Content-Language header |
long |
getContentLength()
Get the value of the Content-Length response header |
IRI |
getContentLocation()
Return the value of the Content-Location header |
javax.activation.MimeType |
getContentType()
Return the value of the Content-Type header |
Date |
getDateHeader(String name)
Return the value of a Date header |
String |
getDecodedHeader(String name)
Get the decoded value of a RFC 2047 header |
String[] |
getDecodedHeaders(String name)
Return multiple decoded values for the specified header |
org.apache.abdera.util.EntityTag |
getEntityTag()
Get the Entity Tag returned by the server |
Date |
getExpires()
Get the date/time this response expires |
String |
getHeader(String name)
Get the value of the specified header |
String[] |
getHeaderNames()
Return a listing of header names |
Object[] |
getHeaders(String name)
Return multiple values for the specified header |
Date |
getLastModified()
Get the value of the Last-Modified response header |
IRI |
getLocation()
Get the value of the Location response header |
long |
getMaxAge()
Return the maximum-age as specified by the Cache-Control header |
String[] |
getNoCacheHeaders()
|
String[] |
getPrivateHeaders()
|
String |
getSlug()
Return the value of the Slug header |
long |
getSMaxAge()
|
int |
getStatus()
Get the specific response status code |
String |
getStatusText()
Get the response status text |
Response.ResponseType |
getType()
Get the response type classification |
boolean |
hasEntity()
True if the response contains an entity |
boolean |
isBinary()
True if the response contains a binary entity as opposed to a character based entity. |
boolean |
isMustRevalidate()
True if the Cache-Control header specifies the must-revalidate directive |
boolean |
isNoCache()
Return true if the Cache-Control header contains no-cache |
boolean |
isNoStore()
Return true if the Cache-Control header contains no-store |
boolean |
isNoTransform()
Return true if the Cache-Control header contains no-transform |
boolean |
isPrivate()
True if the Cache-Control header specifies the private directive |
boolean |
isProxyRevalidate()
True if the Cache-Control header specifies the proxy-revalidate directive |
boolean |
isPublic()
True if the Cache-Control header specified the public directive |
ResponseContext |
removeHeader(String name)
Remove the specified header from the response |
ResponseContext |
setAge(long age)
Set the value of the Age header |
ResponseContext |
setAllow(String... methods)
Specify the HTTP methods allowed |
ResponseContext |
setAllow(String method)
Specify the HTTP methods allowed |
ResponseContext |
setBinary(boolean binary)
True if the response contains a binary entity as opposed to a character based entity. |
ResponseContext |
setContentLanguage(String language)
Set the value of the Content-Language header |
ResponseContext |
setContentLength(long length)
Set the value of the Content-Length header |
ResponseContext |
setContentLocation(String uri)
Set the value of the Content-Location header |
ResponseContext |
setContentType(String type)
Set the value of the Content-Type header |
ResponseContext |
setContentType(String type,
String charset)
Set the value of the Content-Type header |
ResponseContext |
setEncodedHeader(String name,
String charset,
String... vals)
Set an RFC 2047 encoded header in the response |
ResponseContext |
setEncodedHeader(String name,
String charset,
String value)
Set an RFC 2047 encoded header in the response |
ResponseContext |
setEntityTag(org.apache.abdera.util.EntityTag etag)
Set the value of the ETag header |
ResponseContext |
setEntityTag(String etag)
Set the value of the ETag header |
ResponseContext |
setEscapedHeader(String name,
CharUtils.Profile profile,
String value)
Set a pct-encoded header in the response |
ResponseContext |
setExpires(Date date)
Set the value of the Expires header |
ResponseContext |
setHeader(String name,
Object... vals)
Set the value of a header in the response |
ResponseContext |
setHeader(String name,
Object value)
Set the value of a header in the response |
ResponseContext |
setLastModified(Date date)
Set the value of the Last-Modified header |
ResponseContext |
setLocation(String uri)
Set the value of the Location header |
ResponseContext |
setSlug(String slug)
Set the value of the Slug header |
ResponseContext |
setStatus(int status)
Set the response status code |
ResponseContext |
setStatusText(String text)
Set the response status text |
ResponseContext |
setWriter(Writer writer)
Set the Abdera Writer for this response. |
void |
writeTo(OutputStream out)
Write the response out to the specified OutputStream |
void |
writeTo(OutputStream out,
Writer writer)
Write the response out to the specified OutputStream |
void |
writeTo(Writer javaWriter)
Write the response out to the specified Writer |
void |
writeTo(Writer javaWriter,
Writer abderaWriter)
Write the response out to the specified Writer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final ResponseContext response
| Constructor Detail |
|---|
public ResponseContextWrapper(ResponseContext response)
| Method Detail |
|---|
public ResponseContext addEncodedHeader(String name,
String charset,
String value)
ResponseContext
addEncodedHeader in interface ResponseContext
public ResponseContext addEncodedHeaders(String name,
String charset,
String... vals)
ResponseContext
addEncodedHeaders in interface ResponseContext
public ResponseContext addHeader(String name,
Object value)
ResponseContext
addHeader in interface ResponseContext
public ResponseContext addHeaders(String name,
Object... vals)
ResponseContext
addHeaders in interface ResponseContextpublic boolean hasEntity()
ResponseContext
hasEntity in interface ResponseContextpublic ResponseContext removeHeader(String name)
ResponseContext
removeHeader in interface ResponseContextpublic ResponseContext setAge(long age)
ResponseContext
setAge in interface ResponseContextpublic ResponseContext setAllow(String method)
ResponseContext
setAllow in interface ResponseContextpublic ResponseContext setAllow(String... methods)
ResponseContext
setAllow in interface ResponseContextpublic ResponseContext setContentLanguage(String language)
ResponseContext
setContentLanguage in interface ResponseContextpublic ResponseContext setContentLength(long length)
ResponseContext
setContentLength in interface ResponseContextpublic ResponseContext setContentLocation(String uri)
ResponseContext
setContentLocation in interface ResponseContextpublic ResponseContext setContentType(String type)
ResponseContext
setContentType in interface ResponseContext
public ResponseContext setContentType(String type,
String charset)
ResponseContext
setContentType in interface ResponseContext
public ResponseContext setEncodedHeader(String name,
String charset,
String value)
ResponseContext
setEncodedHeader in interface ResponseContext
public ResponseContext setEncodedHeader(String name,
String charset,
String... vals)
ResponseContext
setEncodedHeader in interface ResponseContextpublic ResponseContext setEntityTag(String etag)
ResponseContext
setEntityTag in interface ResponseContextpublic ResponseContext setEntityTag(org.apache.abdera.util.EntityTag etag)
ResponseContext
setEntityTag in interface ResponseContext
public ResponseContext setEscapedHeader(String name,
CharUtils.Profile profile,
String value)
ResponseContext
setEscapedHeader in interface ResponseContextpublic ResponseContext setExpires(Date date)
ResponseContext
setExpires in interface ResponseContext
public ResponseContext setHeader(String name,
Object value)
ResponseContext
setHeader in interface ResponseContext
public ResponseContext setHeader(String name,
Object... vals)
ResponseContext
setHeader in interface ResponseContextpublic ResponseContext setLastModified(Date date)
ResponseContext
setLastModified in interface ResponseContextpublic ResponseContext setLocation(String uri)
ResponseContext
setLocation in interface ResponseContextpublic ResponseContext setSlug(String slug)
ResponseContext
setSlug in interface ResponseContextpublic ResponseContext setStatus(int status)
ResponseContext
setStatus in interface ResponseContextpublic ResponseContext setStatusText(String text)
ResponseContext
setStatusText in interface ResponseContextpublic ResponseContext setWriter(Writer writer)
ResponseContext
setWriter in interface ResponseContext
public void writeTo(OutputStream out)
throws IOException
ResponseContext
writeTo in interface ResponseContextIOException
public void writeTo(Writer javaWriter)
throws IOException
ResponseContext
writeTo in interface ResponseContextIOException
public void writeTo(OutputStream out,
Writer writer)
throws IOException
ResponseContext
writeTo in interface ResponseContextIOException
public void writeTo(Writer javaWriter,
Writer abderaWriter)
throws IOException
ResponseContext
writeTo in interface ResponseContextIOExceptionpublic long getAge()
Response
getAge in interface Responsepublic String getAllow()
Response
getAllow in interface Responsepublic long getContentLength()
Response
getContentLength in interface Responsepublic org.apache.abdera.util.EntityTag getEntityTag()
Response
getEntityTag in interface Responsepublic Date getExpires()
Response
getExpires in interface Responsepublic Date getLastModified()
Response
getLastModified in interface Responsepublic IRI getLocation()
Response
getLocation in interface Responsepublic String[] getNoCacheHeaders()
getNoCacheHeaders in interface Responsepublic String[] getPrivateHeaders()
getPrivateHeaders in interface Responsepublic long getSMaxAge()
getSMaxAge in interface Responsepublic int getStatus()
Response
getStatus in interface Responsepublic String getStatusText()
Response
getStatusText in interface Responsepublic Response.ResponseType getType()
Response
getType in interface Responsepublic boolean isMustRevalidate()
Response
isMustRevalidate in interface Responsepublic boolean isPrivate()
Response
isPrivate in interface Responsepublic boolean isProxyRevalidate()
Response
isProxyRevalidate in interface Responsepublic boolean isPublic()
Response
isPublic in interface Responsepublic String getCacheControl()
Message
getCacheControl in interface Messagepublic String getContentLanguage()
Message
getContentLanguage in interface Messagepublic IRI getContentLocation()
Message
getContentLocation in interface Messagepublic javax.activation.MimeType getContentType()
Message
getContentType in interface Messagepublic Date getDateHeader(String name)
Message
getDateHeader in interface Messagepublic String getDecodedHeader(String name)
Message
getDecodedHeader in interface Messagepublic String[] getDecodedHeaders(String name)
Message
getDecodedHeaders in interface Messagepublic String getHeader(String name)
Message
getHeader in interface Messagepublic String[] getHeaderNames()
Message
getHeaderNames in interface Messagepublic Object[] getHeaders(String name)
Message
getHeaders in interface Messagepublic long getMaxAge()
Message
getMaxAge in interface Messagepublic String getSlug()
Message
getSlug in interface Messagepublic boolean isNoCache()
Message
isNoCache in interface Messagepublic boolean isNoStore()
Message
isNoStore in interface Messagepublic boolean isNoTransform()
Message
isNoTransform in interface Messagepublic boolean isBinary()
ResponseContext
isBinary in interface ResponseContextpublic ResponseContext setBinary(boolean binary)
ResponseContext
setBinary in interface ResponseContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||