|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResponseContext
The ResponseContext encapsulates a server response
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.abdera.protocol.Response |
---|
Response.ResponseType |
Field Summary |
---|
Fields inherited from interface org.apache.abdera.protocol.util.ProtocolConstants |
---|
NOCACHE, NOSTORE, NOTRANSFORM, ONLYIFCACHED, PRIVATE, PROXYREVALIDATE, PUBLIC, REVALIDATE |
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 |
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. |
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 interface org.apache.abdera.protocol.Response |
---|
getAge, getAllow, getContentLength, getEntityTag, getExpires, getLastModified, getLocation, getNoCacheHeaders, getPrivateHeaders, getSMaxAge, getStatus, getStatusText, getType, isMustRevalidate, isPrivate, isProxyRevalidate, isPublic |
Methods inherited from interface org.apache.abdera.protocol.Message |
---|
getCacheControl, getContentLanguage, getContentLocation, getContentType, getDateHeader, getDecodedHeader, getDecodedHeaders, getHeader, getHeaderNames, getHeaders, getMaxAge, getSlug, isNoCache, isNoStore, isNoTransform |
Method Detail |
---|
boolean isBinary()
ResponseContext setBinary(boolean binary)
boolean hasEntity()
void writeTo(OutputStream out) throws IOException
IOException
void writeTo(Writer javaWriter) throws IOException
IOException
void writeTo(OutputStream out, Writer writer) throws IOException
IOException
void writeTo(Writer javaWriter, Writer abderaWriter) throws IOException
IOException
ResponseContext setWriter(Writer writer)
ResponseContext removeHeader(String name)
ResponseContext setEncodedHeader(String name, String charset, String value)
ResponseContext setEncodedHeader(String name, String charset, String... vals)
ResponseContext setEscapedHeader(String name, CharUtils.Profile profile, String value)
ResponseContext setHeader(String name, Object value)
ResponseContext setHeader(String name, Object... vals)
ResponseContext addEncodedHeader(String name, String charset, String value)
ResponseContext addEncodedHeaders(String name, String charset, String... vals)
ResponseContext addHeader(String name, Object value)
ResponseContext addHeaders(String name, Object... vals)
ResponseContext setAge(long age)
ResponseContext setContentLanguage(String language)
ResponseContext setContentLength(long length)
ResponseContext setContentLocation(String uri)
ResponseContext setSlug(String slug)
ResponseContext setContentType(String type)
ResponseContext setContentType(String type, String charset)
ResponseContext setEntityTag(String etag)
ResponseContext setEntityTag(org.apache.abdera.util.EntityTag etag)
ResponseContext setExpires(Date date)
ResponseContext setLastModified(Date date)
ResponseContext setLocation(String uri)
ResponseContext setStatus(int status)
ResponseContext setStatusText(String text)
ResponseContext setAllow(String method)
ResponseContext setAllow(String... methods)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |