Uses of Interface
cn.dinodev.spring.commons.promise.Promise
Packages that use Promise
-
Uses of Promise in cn.dinodev.spring.commons.promise
Subinterfaces of Promise in cn.dinodev.spring.commons.promiseModifier and TypeInterfaceDescriptioninterfaceDeferred<D>Deferred interface to trigger an event (resolve, reject, notify).Classes in cn.dinodev.spring.commons.promise that implement PromiseMethods in cn.dinodev.spring.commons.promise that return PromiseModifier and TypeMethodDescriptionAbstractPromise.always(AlwaysCallback<? super D> callback) Promise.always(AlwaysCallback<? super D> callback) This method will registerAlwaysCallbackso that when a Deferred object is either resolved (Deferred.resolve(Object)) or rejected (Deferred#reject(Object)),AlwaysCallbackwill be triggered.This method will registerDoneCallbackso that when a Deferred object is resolved (Deferred.resolve(Object)),DoneCallbackwill be triggered.This method will registerFailCallbackso that when a Deferred object is rejected (Deferred#reject(Object)),FailCallbackwill be triggered.Deferred.promise()Return anPromiseinstance (i.e., an observer).DeferredObject.promise()Equivalent todone(DoneCallback)Equivalent todone(DoneCallback).fail(FailCallback) -
Uses of Promise in cn.dinodev.spring.commons.utils
Methods in cn.dinodev.spring.commons.utils that return PromiseModifier and TypeMethodDescriptionstatic <R> Promise<R>TaskUtils.exec(Callable<R> task, Predicate<R> checker, int attempts, Class<? extends RuntimeException>... throwOutExceptions) 无参数,有返回的任务调用static <R> Promise<R>TaskUtils.exec(Callable<R> task, Predicate<R> checker, int attempts, Duration nap, Class<? extends RuntimeException>... throwOutExceptions) 无参数,有返回的任务调用<T,U, R> Promise<R> TaskUtils.exec(BiFunction<T, U, R> task, T paramFirst, U paramSecond, Predicate<R> checker, int attempts, Class<? extends RuntimeException>... throwOutExceptions) task接受两个参数,并返回执行结果<T,U, R> Promise<R> TaskUtils.exec(BiFunction<T, U, R> task, T paramFirst, U paramSecond, Predicate<R> checker, int attempts, Duration nap, Class<? extends RuntimeException>... throwOutExceptions) task接受两个参数,并返回执行结果<T,R> Promise<R> TaskUtils.exec(Function<T, R> task, T param, Predicate<R> checker, int attempts, Class<? extends RuntimeException>... throwOutExceptions) task接受一个参数,并返回执行结果<T,R> Promise<R> TaskUtils.exec(Function<T, R> task, T param, Predicate<R> checker, int attempts, Duration nap, Class<? extends RuntimeException>... throwOutExceptions) task接受一个参数,并返回执行结果