org.apache.abdera.protocol.client
Class AbstractClientResponse

java.lang.Object
  extended by org.apache.abdera.protocol.util.AbstractResponse
      extended by org.apache.abdera.protocol.client.AbstractClientResponse
All Implemented Interfaces:
ClientResponse, Response, ResponseInfo, ProtocolConstants
Direct Known Subclasses:
CachedResponseBase, CommonsResponse

public abstract class AbstractClientResponse
extends AbstractResponse
implements ClientResponse


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.abdera.protocol.Response
Response.ResponseType
 
Field Summary
protected  Abdera abdera
           
protected  java.io.InputStream in
           
protected  java.util.Date now
           
protected  Parser parser
           
protected  java.util.Date response_date
           
 
Fields inherited from class org.apache.abdera.protocol.util.AbstractResponse
flags, max_age, nocache_headers, private_headers, smax_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
<T extends Element>
Document<T>
getDocument()
          If the response contains an XML document, parse the document
<T extends Element>
Document<T>
getDocument(Parser parser)
          If the response contains an XML document, parse the document using the specified Parser
<T extends Element>
Document<T>
getDocument(ParserOptions options)
          If the response contains an XML document, parse the document using the specified ParserOptions
<T extends Element>
Document<T>
getDocument(Parser parser, ParserOptions options)
          If the response contains an XML document, parse the document using the specified Parser and ParserOptions
 java.io.InputStream getInputStream()
          Returns the inputstream used to read data from this response
protected  Parser getParser()
           
 java.util.Date getServerDate()
          Return the server-specified date returned in the response
protected  void parse_cc()
           
 void setInputStream(java.io.InputStream in)
           
 
Methods inherited from class org.apache.abdera.protocol.util.AbstractResponse
getAge, getAllow, getCacheControl, getContentLanguage, getContentLength, getContentLocation, getContentType, getEntityTag, getExpires, getLastModified, getLocation, getMaxAge, getNoCacheHeaders, getPrivateHeaders, getSlug, getSMaxAge, getType, getUriHeader, isMustRevalidate, isNoCache, isNoStore, isNoTransform, isPrivate, isProxyRevalidate, isPublic, setMaxAge, setMustRevalidate, setNoCache, setNoCacheHeaders, setNoStore, setNoTransform, setPrivate, setPrivateHeaders, setProxyRevalidate, setPublic
 
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, getCacheControl, getContentLanguage, getContentLength, getContentLocation, getContentType, getDateHeader, getExpires, getHeader, getHeaderNames, getHeaders, getHeaders, getLastModified, getLocation, getMaxAge, getNoCacheHeaders, getPrivateHeaders, getSlug, getSMaxAge, getStatus, getStatusText, getType, getUriHeader, isMustRevalidate, isNoCache, isNoStore, isNoTransform, isPrivate, isProxyRevalidate, isPublic
 
Methods inherited from interface org.apache.abdera.protocol.ResponseInfo
getEntityTag
 

Field Detail

abdera

protected final Abdera abdera

parser

protected final Parser parser

now

protected final java.util.Date now

in

protected java.io.InputStream in

response_date

protected java.util.Date response_date
Constructor Detail

AbstractClientResponse

protected AbstractClientResponse(Abdera abdera)
Method Detail

getParser

protected Parser getParser()

getDocument

public <T extends Element> Document<T> getDocument()
                                        throws ParseException
Description copied from interface: ClientResponse
If the response contains an XML document, parse the document

Specified by:
getDocument in interface ClientResponse
Throws:
ParseException

getDocument

public <T extends Element> Document<T> getDocument(ParserOptions options)
                                        throws ParseException
Description copied from interface: ClientResponse
If the response contains an XML document, parse the document using the specified ParserOptions

Specified by:
getDocument in interface ClientResponse
Throws:
ParseException

getDocument

public <T extends Element> Document<T> getDocument(Parser parser)
                                        throws ParseException
Description copied from interface: ClientResponse
If the response contains an XML document, parse the document using the specified Parser

Specified by:
getDocument in interface ClientResponse
Throws:
ParseException

getDocument

public <T extends Element> Document<T> getDocument(Parser parser,
                                                   ParserOptions options)
                                        throws ParseException
Description copied from interface: ClientResponse
If the response contains an XML document, parse the document using the specified Parser and ParserOptions

Specified by:
getDocument in interface ClientResponse
Throws:
ParseException

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Description copied from interface: ClientResponse
Returns the inputstream used to read data from this response

Specified by:
getInputStream in interface ClientResponse
Throws:
java.io.IOException

setInputStream

public void setInputStream(java.io.InputStream in)
Specified by:
setInputStream in interface ClientResponse

getServerDate

public java.util.Date getServerDate()
Description copied from interface: ClientResponse
Return the server-specified date returned in the response

Specified by:
getServerDate in interface ClientResponse

parse_cc

protected void parse_cc()