public interface FailureCallback<T>
Simple interface that allows asynchronous code to perform a parameterized callback
in a similar way to GWT's callback interface. This is the base interface for Callback
where the logic is broken down to single method interfaces so Java 8 lambdas can be used.
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 onError(Object sender, Throwable err, int errorCode, String errorMessage)
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)