com.basho.riak.client.response
Interface HttpResponse

All Known Subinterfaces:
WithBodyResponse
All Known Implementing Classes:
BucketResponse, DefaultHttpResponse, FetchResponse, HttpResponseDecorator, MapReduceResponse, RiakResponseException, RiakResponseRuntimeException, StoreResponse, WalkResponse

Deprecated. with the addition of a protocol buffers client in 0.14 all the existing REST client code should be in client.http.* this class has therefore been moved. Please use com.basho.riak.client.http.response.HttpResponse instead.

WARNING: This class will be REMOVED in the next version.

@Deprecated
public interface HttpResponse

HTTP response information resulting from some HTTP operation

See Also:
HttpResponse

Method Summary
 void close()
          Deprecated. Releases the underlying the HTTP connection when the response is streamed
 byte[] getBody()
          Deprecated. The HTTP response body or null if isStreamed()
 String getBodyAsString()
          Deprecated.  
 String getBucket()
          Deprecated. The target object's bucket
 Map<String,String> getHttpHeaders()
          Deprecated. The HTTP response headers.
 org.apache.http.client.methods.HttpRequestBase getHttpMethod()
          Deprecated. The actual HttpMethod used to make the HTTP request.
 org.apache.http.HttpResponse getHttpResponse()
          Deprecated.  
 String getKey()
          Deprecated. The target object's key or null if bucket is target
 int getStatusCode()
          Deprecated. Resulting status code from the HTTP request.
 InputStream getStream()
          Deprecated. The HTTP response body as an input stream if isStreamed(); null otherwise
 boolean isError()
          Deprecated. Whether the HTTP request returned a 4xx or 5xx response
 boolean isStreamed()
          Deprecated. Whether the response body is available as an input stream
 boolean isSuccess()
          Deprecated. Whether the HTTP response is considered a success.
 

Method Detail

getBucket

String getBucket()
Deprecated. 
The target object's bucket


getKey

String getKey()
Deprecated. 
The target object's key or null if bucket is target


getStatusCode

int getStatusCode()
Deprecated. 
Resulting status code from the HTTP request.


getHttpHeaders

Map<String,String> getHttpHeaders()
Deprecated. 
The HTTP response headers.


getBody

byte[] getBody()
Deprecated. 
The HTTP response body or null if isStreamed()


getBodyAsString

String getBodyAsString()
Deprecated. 

getStream

InputStream getStream()
Deprecated. 
The HTTP response body as an input stream if isStreamed(); null otherwise


isStreamed

boolean isStreamed()
Deprecated. 
Whether the response body is available as an input stream


getHttpMethod

org.apache.http.client.methods.HttpRequestBase getHttpMethod()
Deprecated. 
The actual HttpMethod used to make the HTTP request. Most of the data here can be retrieved more simply using methods in this class. Also, note that the connection will already be closed, so calling getHttpMethod().getResponseBodyAsStream() will return null.


isSuccess

boolean isSuccess()
Deprecated. 
Whether the HTTP response is considered a success. Generally this translates to a 2xx for any request, a 304 for GET and HEAD requests, or 404 for DELETE requests.


isError

boolean isError()
Deprecated. 
Whether the HTTP request returned a 4xx or 5xx response


close

void close()
Deprecated. 
Releases the underlying the HTTP connection when the response is streamed


getHttpResponse

org.apache.http.HttpResponse getHttpResponse()
Deprecated. 
Returns:


Copyright © 2012. All Rights Reserved.