public class CallbackAdapter<T>

  1. Object
  2. 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

value T
the value

onError

public void onError(Object sender, Throwable err, int errorCode, String errorMessage)
Invoked when the async method throws an exception

Parameters

sender Object
the source of the error e.g. connection request that triggered the error, could be null
err Throwable
in case of an error triggered by an exception
errorCode int
if applicable e.g. with http error codes, -1 for unknown
errorMessage String
if applicable a user displayable message (can be null)