|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.basho.riak.client.response.RiakResponseRuntimeException
WARNING: This class will be REMOVED in the next version.
@Deprecated public class RiakResponseRuntimeException
Thrown when the Riak server returns a malformed response. The HTTP response is returned in the exception.
RiakResponseRuntimeException
,
Serialized FormConstructor Summary | |
---|---|
RiakResponseRuntimeException(HttpResponse response)
Deprecated. |
|
RiakResponseRuntimeException(HttpResponse response,
String message)
Deprecated. |
|
RiakResponseRuntimeException(HttpResponse response,
String message,
Throwable cause)
Deprecated. |
|
RiakResponseRuntimeException(HttpResponse response,
Throwable cause)
Deprecated. |
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. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RiakResponseRuntimeException(HttpResponse response)
public RiakResponseRuntimeException(HttpResponse response, String message, Throwable cause)
public RiakResponseRuntimeException(HttpResponse response, String message)
public RiakResponseRuntimeException(HttpResponse response, Throwable cause)
Method Detail |
---|
public byte[] getBody()
HttpResponse
getBody
in interface HttpResponse
public String getBodyAsString()
getBodyAsString
in interface HttpResponse
public InputStream getStream()
HttpResponse
getStream
in interface HttpResponse
public boolean isStreamed()
HttpResponse
isStreamed
in interface HttpResponse
public String getBucket()
HttpResponse
getBucket
in interface HttpResponse
public Map<String,String> getHttpHeaders()
HttpResponse
getHttpHeaders
in interface HttpResponse
public org.apache.http.client.methods.HttpRequestBase getHttpMethod()
HttpResponse
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.
getHttpMethod
in interface HttpResponse
public String getKey()
HttpResponse
getKey
in interface HttpResponse
public int getStatusCode()
HttpResponse
getStatusCode
in interface HttpResponse
public boolean isError()
HttpResponse
isError
in interface HttpResponse
public boolean isSuccess()
HttpResponse
isSuccess
in interface HttpResponse
public void close()
HttpResponse
close
in interface HttpResponse
public org.apache.http.HttpResponse getHttpResponse()
getHttpResponse
in interface HttpResponse
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |