|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.stackmob.sdk.callback.StackMobRawCallback
com.stackmob.sdk.callback.StackMobBinaryCallback
public abstract class StackMobBinaryCallback
A callback class that allows access to the raw byte array of the response body. This is helpful when the body is binary payload such as a generic String or image.
| Field Summary |
|---|
| Fields inherited from class com.stackmob.sdk.callback.StackMobRawCallback |
|---|
requestBody, requestHeaders, requestURL, requestVerb, responseBody, responseHeaders, responseStatusCode, retriesRemaining |
| Constructor Summary | |
|---|---|
StackMobBinaryCallback()
|
|
| Method Summary | |
|---|---|
void |
done(com.stackmob.sdk.net.HttpVerb requestVerb,
String requestURL,
List<Map.Entry<String,String>> requestHeaders,
String requestBody,
Integer responseStatusCode,
List<Map.Entry<String,String>> responseHeaders,
byte[] responseBody)
the method that will be called when the call to StackMob is complete. |
abstract void |
failure(StackMobException e)
override this method to handle errors |
abstract void |
success(byte[] responseBody)
override this method to handles cases where a call has succeeded. |
void |
temporaryPasswordResetRequired(StackMobException e)
the method that will be called in the very specific case where a user has done a login with a temporary password, and now they need to reset their password to continue. |
void |
unsent(StackMobException e)
the method that will be called when a call to StackMob cannot even be sent for some reason |
| Methods inherited from class com.stackmob.sdk.callback.StackMobRawCallback |
|---|
getRetriesRemaining, getTotalNumberOfItemsFromContentRange, getTotalObjectCountFromPagination, retry, setDone, setRetriesRemaining |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StackMobBinaryCallback()
| Method Detail |
|---|
public void unsent(StackMobException e)
StackMobRawCallback
unsent in class StackMobRawCallbacke - an error with the reason whypublic void temporaryPasswordResetRequired(StackMobException e)
StackMobRawCallbackStackMobUser.loginResettingTemporaryPassword(String, StackMobCallback)
with the new password
temporaryPasswordResetRequired in class StackMobRawCallbacke - an error with the reason why
public void done(com.stackmob.sdk.net.HttpVerb requestVerb,
String requestURL,
List<Map.Entry<String,String>> requestHeaders,
String requestBody,
Integer responseStatusCode,
List<Map.Entry<String,String>> responseHeaders,
byte[] responseBody)
StackMobRawCallback
done in class StackMobRawCallbackrequestVerb - the HTTP verb that was requestedrequestURL - the URL that was requestedrequestHeaders - the headers in the requestrequestBody - the body of the request. will be an empty string for GET, DELETE, etc...responseStatusCode - the status code of the HTTP response from StackMobresponseHeaders - the response headers from StackMobresponseBody - the response body from StackMobpublic abstract void success(byte[] responseBody)
responseBody - the response binary received from StackMobpublic abstract void failure(StackMobException e)
e - a representation of the error that occurred
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||