public class CallbackAdapter<T>
- Object
- CallbackAdapter
ImplementsCallback<T>, FailureCallback<T>, SuccessCallback<T>
Adapter for the {Callback} interface.
Constructors
public CallbackAdapter() |
Methods
public void onSucess(T value) | Invoked when the async method returns with a successful value |
public void onError(Object sender, Throwable err, int errorCode, String errorMessage) | Invoked when the async method throws an exception |
Inherited methods
Constructor details
CallbackAdapter
public CallbackAdapter()Method details
onSucess
public void onSucess(T value)Invoked when the async method returns with a successful value
Parameters
valueT- the value
onError
public void onError(Object sender, Throwable err, int errorCode, String errorMessage)Invoked when the async method throws an exception
Parameters
senderObject- the source of the error e.g. connection request that triggered the error, could be null
errThrowable- in case of an error triggered by an exception
errorCodeint- if applicable e.g. with http error codes, -1 for unknown
errorMessageString- if applicable a user displayable message (can be null)