|
||||||||||
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 ResponseContext
public boolean hasEntity()
ResponseContext
hasEntity
in interface ResponseContext
public ResponseContext removeHeader(String name)
ResponseContext
removeHeader
in interface ResponseContext
public ResponseContext setAge(long age)
ResponseContext
setAge
in interface ResponseContext
public ResponseContext setAllow(String method)
ResponseContext
setAllow
in interface ResponseContext
public ResponseContext setAllow(String... methods)
ResponseContext
setAllow
in interface ResponseContext
public ResponseContext setContentLanguage(String language)
ResponseContext
setContentLanguage
in interface ResponseContext
public ResponseContext setContentLength(long length)
ResponseContext
setContentLength
in interface ResponseContext
public ResponseContext setContentLocation(String uri)
ResponseContext
setContentLocation
in interface ResponseContext
public 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 ResponseContext
public ResponseContext setEntityTag(String etag)
ResponseContext
setEntityTag
in interface ResponseContext
public 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 ResponseContext
public 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 ResponseContext
public ResponseContext setLastModified(Date date)
ResponseContext
setLastModified
in interface ResponseContext
public ResponseContext setLocation(String uri)
ResponseContext
setLocation
in interface ResponseContext
public ResponseContext setSlug(String slug)
ResponseContext
setSlug
in interface ResponseContext
public ResponseContext setStatus(int status)
ResponseContext
setStatus
in interface ResponseContext
public ResponseContext setStatusText(String text)
ResponseContext
setStatusText
in interface ResponseContext
public ResponseContext setWriter(Writer writer)
ResponseContext
setWriter
in interface ResponseContext
public void writeTo(OutputStream out) throws IOException
ResponseContext
writeTo
in interface ResponseContext
IOException
public void writeTo(Writer javaWriter) throws IOException
ResponseContext
writeTo
in interface ResponseContext
IOException
public void writeTo(OutputStream out, Writer writer) throws IOException
ResponseContext
writeTo
in interface ResponseContext
IOException
public void writeTo(Writer javaWriter, Writer abderaWriter) throws IOException
ResponseContext
writeTo
in interface ResponseContext
IOException
public long getAge()
Response
getAge
in interface Response
public String getAllow()
Response
getAllow
in interface Response
public long getContentLength()
Response
getContentLength
in interface Response
public org.apache.abdera.util.EntityTag getEntityTag()
Response
getEntityTag
in interface Response
public Date getExpires()
Response
getExpires
in interface Response
public Date getLastModified()
Response
getLastModified
in interface Response
public IRI getLocation()
Response
getLocation
in interface Response
public String[] getNoCacheHeaders()
getNoCacheHeaders
in interface Response
public String[] getPrivateHeaders()
getPrivateHeaders
in interface Response
public long getSMaxAge()
getSMaxAge
in interface Response
public int getStatus()
Response
getStatus
in interface Response
public String getStatusText()
Response
getStatusText
in interface Response
public Response.ResponseType getType()
Response
getType
in interface Response
public boolean isMustRevalidate()
Response
isMustRevalidate
in interface Response
public boolean isPrivate()
Response
isPrivate
in interface Response
public boolean isProxyRevalidate()
Response
isProxyRevalidate
in interface Response
public boolean isPublic()
Response
isPublic
in interface Response
public String getCacheControl()
Message
getCacheControl
in interface Message
public String getContentLanguage()
Message
getContentLanguage
in interface Message
public IRI getContentLocation()
Message
getContentLocation
in interface Message
public javax.activation.MimeType getContentType()
Message
getContentType
in interface Message
public Date getDateHeader(String name)
Message
getDateHeader
in interface Message
public String getDecodedHeader(String name)
Message
getDecodedHeader
in interface Message
public String[] getDecodedHeaders(String name)
Message
getDecodedHeaders
in interface Message
public String getHeader(String name)
Message
getHeader
in interface Message
public String[] getHeaderNames()
Message
getHeaderNames
in interface Message
public Object[] getHeaders(String name)
Message
getHeaders
in interface Message
public long getMaxAge()
Message
getMaxAge
in interface Message
public String getSlug()
Message
getSlug
in interface Message
public boolean isNoCache()
Message
isNoCache
in interface Message
public boolean isNoStore()
Message
isNoStore
in interface Message
public boolean isNoTransform()
Message
isNoTransform
in interface Message
public boolean isBinary()
ResponseContext
isBinary
in interface ResponseContext
public 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 |