org.apache.abdera.protocol.client.cache
Class InMemoryCachedResponse

java.lang.Object
  extended by org.apache.abdera.protocol.util.AbstractResponse
      extended by org.apache.abdera.protocol.client.AbstractClientResponse
          extended by org.apache.abdera.protocol.client.cache.CachedResponseBase
              extended by org.apache.abdera.protocol.client.cache.InMemoryCachedResponse
All Implemented Interfaces:
CachedResponse, ClientResponse, Response, ResponseInfo, ProtocolConstants

public class InMemoryCachedResponse
extends CachedResponseBase
implements CachedResponse


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.abdera.protocol.Response
Response.ResponseType
 
Field Summary
 
Fields inherited from class org.apache.abdera.protocol.client.cache.CachedResponseBase
cache, initial_age, key
 
Fields inherited from class org.apache.abdera.protocol.client.AbstractClientResponse
abdera, in, now, parser, 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
InMemoryCachedResponse(Abdera abdera, Cache cache, CacheKey key, ClientResponse response)
           
 
Method Summary
 java.util.Date getDateHeader(java.lang.String header)
           
 java.lang.String getHeader(java.lang.String header)
           
 java.lang.String[] getHeaderNames()
           
 java.util.Map<java.lang.String,java.util.List<java.lang.Object>> getHeaders()
           
 java.util.List<java.lang.Object> getHeaders(java.lang.String header)
           
 java.io.InputStream getInputStream()
          Returns the inputstream used to read data from this response
 java.lang.String getMethod()
          Return the request method
 int getStatus()
           
 java.lang.String getStatusText()
           
 java.lang.String getUri()
          Return the request URI.
 void setInputStream(java.io.InputStream in)
           
 
Methods inherited from class org.apache.abdera.protocol.client.cache.CachedResponseBase
geKey, getCache, getCachedTime, getCurrentAge, getDisposition, getFreshnessLifetime, getHowStale, getInitialAge, getResidentAge, isFresh, release
 
Methods inherited from class org.apache.abdera.protocol.client.AbstractClientResponse
getDocument, getDocument, getDocument, getDocument, getParser, getServerDate, parse_cc
 
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.cache.CachedResponse
geKey, getCache, getCachedTime, getCurrentAge, getFreshnessLifetime, getHowStale, getInitialAge, getResidentAge, isFresh
 
Methods inherited from interface org.apache.abdera.protocol.client.ClientResponse
getDocument, getDocument, getDocument, getDocument, getServerDate, release
 
Methods inherited from interface org.apache.abdera.protocol.Response
getAge, getAllow, getCacheControl, getContentLanguage, getContentLength, getContentLocation, getContentType, getExpires, getLastModified, getLocation, getMaxAge, getNoCacheHeaders, getPrivateHeaders, getSlug, getSMaxAge, getType, getUriHeader, isMustRevalidate, isNoCache, isNoStore, isNoTransform, isPrivate, isProxyRevalidate, isPublic
 
Methods inherited from interface org.apache.abdera.protocol.ResponseInfo
getEntityTag
 

Constructor Detail

InMemoryCachedResponse

public InMemoryCachedResponse(Abdera abdera,
                              Cache cache,
                              CacheKey key,
                              ClientResponse response)
                       throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getHeaders

public java.util.Map<java.lang.String,java.util.List<java.lang.Object>> getHeaders()
Specified by:
getHeaders in interface Response

getMethod

public java.lang.String getMethod()
Description copied from interface: ClientResponse
Return the request method

Specified by:
getMethod in interface ClientResponse

getHeader

public java.lang.String getHeader(java.lang.String header)
Specified by:
getHeader in interface Response

getHeaderNames

public java.lang.String[] getHeaderNames()
Specified by:
getHeaderNames in interface Response

getHeaders

public java.util.List<java.lang.Object> getHeaders(java.lang.String header)
Specified by:
getHeaders in interface Response

getStatus

public int getStatus()
Specified by:
getStatus in interface Response

getStatusText

public java.lang.String getStatusText()
Specified by:
getStatusText in interface Response

getUri

public java.lang.String getUri()
Description copied from interface: ClientResponse
Return the request URI. The request was redirected, this will return the new URI

Specified by:
getUri in interface ClientResponse

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
Overrides:
getInputStream in class AbstractClientResponse
Throws:
java.io.IOException

setInputStream

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

getDateHeader

public java.util.Date getDateHeader(java.lang.String header)
Specified by:
getDateHeader in interface Response