| Modifier and Type | Method and Description |
|---|---|
static void |
dispatchError(FailureCallback failure,
Throwable error)
Calls the given callback's
FailureCallback.onError(java.lang.Object, java.lang.Throwable, int, java.lang.String) method, passing the supplied error as
a parameter. |
static <T> void |
dispatchSuccess(SuccessCallback<T> success,
T arg)
Calls the given callback's
SuccessCallback.onSucess(java.lang.Object) method, passing the supplied arg as
a parameter. |
void |
run() |
public static <T> void dispatchSuccess(SuccessCallback<T> success, T arg)
SuccessCallback.onSucess(java.lang.Object) method, passing the supplied arg as
a parameter. This method guarantees that onSuccess() will be called on the EDT. If it is already running
on the EDT, it will just call it directly. Otherwise it will wrap it in Display.callSerially(java.lang.Runnable).T - The type of the callback.success - The success callback to be called.arg - The argument to pass to the success callback.public static void dispatchError(FailureCallback failure, Throwable error)
FailureCallback.onError(java.lang.Object, java.lang.Throwable, int, java.lang.String) method, passing the supplied error as
a parameter. This method guarantees that onError() will be called on the EDT. If it is already running
on the EDT, it will just call it directly. Otherwise it will wrap it in Display.callSerially(java.lang.Runnable).failure - The failure callback to be called.error - The error to pass to the callbackCopyright © 2021. All rights reserved.