public class CallbackAdapter<T> extends Object implements Callback<T>
Constructor and Description |
---|
CallbackAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
onError(Object sender,
Throwable err,
int errorCode,
String errorMessage)
Invoked when the async method throws an exception
|
void |
onSucess(T value)
Invoked when the async method returns with a successful value
|
public void onSucess(T value)
onSucess
in interface SuccessCallback<T>
value
- the valuepublic void onError(Object sender, Throwable err, int errorCode, String errorMessage)
onError
in interface FailureCallback<T>
sender
- the source of the error e.g. connection request that triggered the error, could be nullerr
- in case of an error triggered by an exceptionerrorCode
- if applicable e.g. with http error codes, -1 for unknownerrorMessage
- if applicable a user displayable message (can be null)