org.apache.abdera.protocol.client
Class CommonsResponse

java.lang.Object
  extended by org.apache.abdera.protocol.util.AbstractMessage
      extended by org.apache.abdera.protocol.util.AbstractResponse
          extended by org.apache.abdera.protocol.client.AbstractClientResponse
              extended by org.apache.abdera.protocol.client.CommonsResponse
All Implemented Interfaces:
ClientResponse, Message, Response, ProtocolConstants

public class CommonsResponse
extends AbstractClientResponse
implements ClientResponse


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.AbstractClientResponse
abdera, in, now, parser, 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 CommonsResponse(Abdera abdera, org.apache.commons.httpclient.HttpMethod method)
           
 
Method Summary
 String getHeader(String header)
          Return the value of the named HTTP header
 String[] getHeaderNames()
          Return a listing of HTTP header names
 Map<String,Object[]> getHeaders()
          Return all of the HTTP headers
 Object[] getHeaders(String header)
          Return the values of the named HTTP header
 org.apache.commons.httpclient.HttpMethod getHttpMethod()
           
 InputStream getInputStream()
          Return the inputstream for reading the content of the response.
 String getMethod()
          Return the request method
 int getStatus()
          Return the status code of the response
 String getStatusText()
          Return the status text of the response
 String getUri()
          Return the request URI
 void release()
          Release the resources associated with this response
 
Methods inherited from class org.apache.abdera.protocol.client.AbstractClientResponse
getCharacterEncoding, getDateHeader, getDocument, getDocument, getDocument, getDocument, getParser, getReader, getReader, getServerDate, initResponseDate, parse_cc, setInputStream
 
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
getCharacterEncoding, getDocument, getDocument, getDocument, getDocument, getReader, getReader, getServerDate, setInputStream
 
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
getCacheControl, getContentLanguage, getContentLocation, getContentType, getDateHeader, getDecodedHeader, getDecodedHeaders, getMaxAge, getSlug, isNoCache, isNoStore, isNoTransform
 

Constructor Detail

CommonsResponse

protected CommonsResponse(Abdera abdera,
                          org.apache.commons.httpclient.HttpMethod method)
Method Detail

getHttpMethod

public org.apache.commons.httpclient.HttpMethod getHttpMethod()

getMethod

public String getMethod()
Return the request method

Specified by:
getMethod in interface ClientResponse

getStatus

public int getStatus()
Return the status code of the response

Specified by:
getStatus in interface Response

getStatusText

public String getStatusText()
Return the status text of the response

Specified by:
getStatusText in interface Response

release

public void release()
Release the resources associated with this response

Specified by:
release in interface ClientResponse

getHeader

public String getHeader(String header)
Return the value of the named HTTP header

Specified by:
getHeader in interface Message

getHeaders

public Object[] getHeaders(String header)
Return the values of the named HTTP header

Specified by:
getHeaders in interface Message

getHeaders

public Map<String,Object[]> getHeaders()
Return all of the HTTP headers


getHeaderNames

public String[] getHeaderNames()
Return a listing of HTTP header names

Specified by:
getHeaderNames in interface Message

getUri

public String getUri()
Return the request URI

Specified by:
getUri in interface ClientResponse

getInputStream

public InputStream getInputStream()
                           throws IOException
Return the inputstream for reading the content of the response. The InputStream returned will automatically decode Content-Encodings and will automatically release the response when the stream has been read fully.

Specified by:
getInputStream in interface ClientResponse
Overrides:
getInputStream in class AbstractClientResponse
Throws:
IOException


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.