|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.abdera.protocol.util.AbstractMessage
org.apache.abdera.protocol.util.AbstractResponse
org.apache.abdera.protocol.server.context.AbstractResponseContext
public abstract class AbstractResponseContext
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.abdera.protocol.Response |
---|
Response.ResponseType |
Field Summary | |
---|---|
protected boolean |
binary
|
protected static String[] |
EMPTY
|
protected Map<String,Object[]> |
headers
|
protected int |
status
|
protected String |
status_text
|
protected Writer |
writer
|
Fields inherited from class org.apache.abdera.protocol.util.AbstractResponse |
---|
nocache_headers, private_headers, smax_age |
Fields inherited from class org.apache.abdera.protocol.util.AbstractMessage |
---|
flags, max_age |
Fields inherited from interface org.apache.abdera.protocol.util.ProtocolConstants |
---|
NOCACHE, NOSTORE, NOTRANSFORM, ONLYIFCACHED, PRIVATE, PROXYREVALIDATE, PUBLIC, REVALIDATE |
Constructor Summary | |
---|---|
AbstractResponseContext()
|
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 |
String |
getCacheControl()
Return the value of the Cache-Control header |
Date |
getDateHeader(String name)
Return the value of a Date header |
String |
getHeader(String name)
Get the value of the specified header |
String[] |
getHeaderNames()
Return a listing of header names |
Map<String,Object[]> |
getHeaders()
|
Object[] |
getHeaders(String name)
Return multiple values for the specified header |
int |
getStatus()
Get the specific response status code |
String |
getStatusText()
Get the response status text |
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. |
Methods inherited from class org.apache.abdera.protocol.util.AbstractResponse |
---|
getAge, getAllow, getContentLength, getEntityTag, getExpires, getLastModified, getLocation, getNoCacheHeaders, getPrivateHeaders, getSMaxAge, getType, isMustRevalidate, isPrivate, isProxyRevalidate, isPublic, setMaxAge, setMustRevalidate, setNoCache, setNoCacheHeaders, setNoStore, setNoTransform, setPrivate, setPrivateHeaders, setProxyRevalidate, setPublic |
Methods inherited from class org.apache.abdera.protocol.util.AbstractMessage |
---|
check, getContentLanguage, getContentLocation, getContentType, getDecodedHeader, getDecodedHeaders, getMaxAge, getSlug, isNoCache, isNoStore, isNoTransform, toggle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.abdera.protocol.server.ResponseContext |
---|
hasEntity, writeTo, writeTo, writeTo, writeTo |
Methods inherited from interface org.apache.abdera.protocol.Response |
---|
getAge, getAllow, getContentLength, getEntityTag, getExpires, getLastModified, getLocation, getNoCacheHeaders, getPrivateHeaders, getSMaxAge, getType, isMustRevalidate, isPrivate, isProxyRevalidate, isPublic |
Methods inherited from interface org.apache.abdera.protocol.Message |
---|
getContentLanguage, getContentLocation, getContentType, getDecodedHeader, getDecodedHeaders, getMaxAge, getSlug, isNoCache, isNoStore, isNoTransform |
Field Detail |
---|
protected static final String[] EMPTY
protected int status
protected String status_text
protected Writer writer
protected boolean binary
protected Map<String,Object[]> headers
Constructor Detail |
---|
public AbstractResponseContext()
Method Detail |
---|
public ResponseContext setBinary(boolean binary)
ResponseContext
setBinary
in interface ResponseContext
public boolean isBinary()
ResponseContext
isBinary
in interface ResponseContext
public ResponseContext removeHeader(String name)
ResponseContext
removeHeader
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 setEscapedHeader(String name, CharUtils.Profile profile, String value)
ResponseContext
setEscapedHeader
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 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 Map<String,Object[]> getHeaders()
public Date getDateHeader(String name)
Message
getDateHeader
in interface Message
public String getHeader(String name)
Message
getHeader
in interface Message
public Object[] getHeaders(String name)
Message
getHeaders
in interface Message
public String[] getHeaderNames()
Message
getHeaderNames
in interface Message
public String getCacheControl()
Message
getCacheControl
in interface Message
getCacheControl
in class AbstractMessage
public ResponseContext setAge(long age)
ResponseContext
setAge
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 setSlug(String slug)
ResponseContext
setSlug
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 setEntityTag(String etag)
ResponseContext
setEntityTag
in interface ResponseContext
public ResponseContext setEntityTag(org.apache.abdera.util.EntityTag etag)
ResponseContext
setEntityTag
in interface ResponseContext
public ResponseContext setExpires(Date date)
ResponseContext
setExpires
in interface ResponseContext
public ResponseContext setLastModified(Date date)
ResponseContext
setLastModified
in interface ResponseContext
public ResponseContext setLocation(String uri)
ResponseContext
setLocation
in interface ResponseContext
public int getStatus()
Response
getStatus
in interface Response
public ResponseContext setStatus(int status)
ResponseContext
setStatus
in interface ResponseContext
public String getStatusText()
Response
getStatusText
in interface Response
public ResponseContext setStatusText(String text)
ResponseContext
setStatusText
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 setWriter(Writer writer)
ResponseContext
setWriter
in interface ResponseContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |