Package io.deephaven.web.client.api
Interface Callbacks
public interface Callbacks
A set of utilities for creating callbacks and promises using lambdas.
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <S,
F> void failLog
(HasEventHandling failHandler, Consumer<S> from, F failure) static <S,
F> elemental2.promise.Promise<S> grpcUnaryPromise
(Consumer<JsBiConsumer<F, S>> t) static <S> elemental2.promise.Promise.PromiseExecutorCallbackFn.RejectCallbackFn
notNull
(HasEventHandling failHandler, Consumer<S> realCallback, elemental2.promise.Promise.PromiseExecutorCallbackFn.RejectCallbackFn reject) of
(HasEventHandling failHandler, Consumer<S> from) static <S,
F> Callback<S, F> of
(BiConsumer<S, F> from) Transform a bi-consumer into a callback.static <S,
T> elemental2.promise.Promise<S> promise
(HasEventHandling failHandler, Consumer<Callback<S, T>> t) static <S,
F> void translateCallback
(Callback<S, String> callback, Consumer<JsBiConsumer<F, S>> t)
-
Method Details
-
promise
static <S,T> elemental2.promise.Promise<S> promise(@Nullable HasEventHandling failHandler, Consumer<Callback<S, T>> t) -
notNull
static <S> elemental2.promise.Promise.PromiseExecutorCallbackFn.RejectCallbackFn notNull(@Nullable HasEventHandling failHandler, Consumer<S> realCallback, elemental2.promise.Promise.PromiseExecutorCallbackFn.RejectCallbackFn reject) -
of
-
failLog
-
of
Transform a bi-consumer into a callback. It is the caller's responsibility to fire "requestfailed" events as appropriate. -
grpcUnaryPromise
-
translateCallback
-