|
||||||||||
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.client.AbstractClientResponse
public abstract class AbstractClientResponse
Abstract base class for a ClientResponse
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.abdera.protocol.Response |
---|
Response.ResponseType |
Field Summary | |
---|---|
protected Abdera |
abdera
|
protected InputStream |
in
|
protected Date |
now
|
protected Parser |
parser
|
protected Date |
response_date
|
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 | |
---|---|
protected |
AbstractClientResponse(Abdera abdera)
|
Method Summary | ||
---|---|---|
String |
getCharacterEncoding()
Get the character set encoding specified by the server in the Content-Type header |
|
Date |
getDateHeader(String header)
Return the named HTTP header as a java.util.Date |
|
|
getDocument()
Get the response payload as a parsed Abdera FOM Document |
|
|
getDocument(Parser parser)
Get the response payload as a parsed Abdera FOM Document using the specified parser |
|
|
getDocument(ParserOptions options)
Get the response payload as a parsed Abdera FOM Document using the specified parser options |
|
|
getDocument(Parser parser,
ParserOptions options)
Get the response payload as a parsed Abdera FOM Document using the specified parser and parser options |
|
InputStream |
getInputStream()
Get the response payload as an input stream |
|
protected Parser |
getParser()
|
|
Reader |
getReader()
Get the response payload as a reader (assumed UTF-8 charset) |
|
Reader |
getReader(String charset)
Get the response payload as a reader using the specified charset |
|
Date |
getServerDate()
Return the date returned by the server in the response |
|
protected Date |
initResponseDate()
|
|
protected void |
parse_cc()
|
|
void |
setInputStream(InputStream in)
Set the response input stream (used internally by Abdera) |
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, getCacheControl, 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.client.ClientResponse |
---|
getMethod, getUri, release |
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, getDecodedHeader, getDecodedHeaders, getHeader, getHeaderNames, getHeaders, getMaxAge, getSlug, isNoCache, isNoStore, isNoTransform |
Field Detail |
---|
protected final Abdera abdera
protected final Parser parser
protected final Date now
protected InputStream in
protected Date response_date
Constructor Detail |
---|
protected AbstractClientResponse(Abdera abdera)
Method Detail |
---|
protected Date initResponseDate()
protected Parser getParser()
public <T extends Element> Document<T> getDocument() throws ParseException
getDocument
in interface ClientResponse
ParseException
public <T extends Element> Document<T> getDocument(ParserOptions options) throws ParseException
getDocument
in interface ClientResponse
options
- The parser options
ParseException
public <T extends Element> Document<T> getDocument(Parser parser) throws ParseException
getDocument
in interface ClientResponse
parser
- The parser
ParseException
public <T extends Element> Document<T> getDocument(Parser parser, ParserOptions options) throws ParseException
getDocument
in interface ClientResponse
parser
- The parseroptions
- The parser options
ParseException
public InputStream getInputStream() throws IOException
getInputStream
in interface ClientResponse
IOException
public void setInputStream(InputStream in)
setInputStream
in interface ClientResponse
public Reader getReader() throws IOException
getReader
in interface ClientResponse
IOException
public Reader getReader(String charset) throws IOException
getReader
in interface ClientResponse
charset
- The character set encoding
IOException
public Date getServerDate()
getServerDate
in interface ClientResponse
protected void parse_cc()
public String getCharacterEncoding()
getCharacterEncoding
in interface ClientResponse
public Date getDateHeader(String header)
getDateHeader
in interface Message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |