public interface Callback<T>
void onSucess(T value)
value
- the valuevoid 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)