public class BaseDataSiftResult extends Object implements DataSiftResult
| Modifier and Type | Field and Description |
|---|---|
protected String |
error |
protected Response |
response |
| Constructor and Description |
|---|
BaseDataSiftResult() |
| Modifier and Type | Method and Description |
|---|---|
void |
failed(Throwable e) |
Throwable |
failureCause() |
String |
getError() |
Response |
getResponse() |
boolean |
isAuthorizationSuccesful() |
boolean |
isSuccessful()
A response is considered successful if if a response has been received, the response doesn't contain an error
message AND the HTTP response status code is 200 to 399 (i.e.
|
int |
rateLimit() |
int |
rateLimitCost()
Not all API calls are created equally.
|
int |
rateLimitRemaining() |
void |
setResponse(Response response) |
void |
successful() |
String |
toString() |
public boolean isSuccessful()
DataSiftResultisSuccessful in interface DataSiftResultpublic Response getResponse()
getResponse in interface DataSiftResultpublic void setResponse(Response response)
setResponse in interface DataSiftResultpublic Throwable failureCause()
failureCause in interface DataSiftResultpublic boolean isAuthorizationSuccesful()
isAuthorizationSuccesful in interface DataSiftResultpublic int rateLimit()
rateLimit in interface DataSiftResultDataSiftClient.DEFAULT_NUM
if the information was not returnedpublic int rateLimitRemaining()
rateLimitRemaining in interface DataSiftResultDataSiftClient.DEFAULT_NUM if the information was not returnedpublic int rateLimitCost()
DataSiftResultrateLimitCost in interface DataSiftResultDataSiftClient.DEFAULT_NUM if the information was not returnedpublic String getError()
getError in interface DataSiftResultDataSiftResult.isSuccessful() == false then this returns the error message DataSift returned or null if truepublic void failed(Throwable e)
failed in interface DataSiftResultpublic void successful()
successful in interface DataSiftResultCopyright © 2015. All Rights Reserved.