com.stackmob.sdk.callback
Class StackMobIntermediaryCallback
java.lang.Object
com.stackmob.sdk.callback.StackMobRawCallback
com.stackmob.sdk.callback.StackMobCallback
com.stackmob.sdk.callback.StackMobIntermediaryCallback
public class StackMobIntermediaryCallback
- extends StackMobCallback
A callback that allows you to inject some logic before the actual callback is called. This is useful when you want to reuse some standard
callbacks but inject some custom logic in various places. This is a specialized class and most apps will never need it.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StackMobIntermediaryCallback
public StackMobIntermediaryCallback(StackMobCallback furtherCallback)
- Create a callback that by default just passes through to the given callback
- Parameters:
furtherCallback - the callback that should receive messages in the end
getFurtherCallback
public StackMobCallback getFurtherCallback()
success
public void success(String responseBody)
- override and call super to inject custom logic before success
- Specified by:
success in class StackMobCallback
- Parameters:
responseBody - the response string received from StackMob
failure
public void failure(StackMobException e)
- override and call super to inject custom logic before failure
- Specified by:
failure in class StackMobCallback
- Parameters:
e - a representation of the error that occurred
Copyright © 2013 StackMob. All Rights Reserved.