Skip navigation links
A B C E F G I L M P R S T V W 

A

AggregateException - Exception in me.joeycumines.javapromises.core
A list of exceptions which cause this one.
AggregateException() - Constructor for exception me.joeycumines.javapromises.core.AggregateException
 
AggregateException(List<Throwable>) - Constructor for exception me.joeycumines.javapromises.core.AggregateException
 
all(Promise<? extends T>, Promise<? extends T>...) - Method in class me.joeycumines.javapromises.core.PromiseApi
 
all(Iterable<? extends Promise<? extends T>>) - Method in class me.joeycumines.javapromises.core.PromiseApi
Given an iterable of one or more promises, return a promise, that will resolve with a List containing the fulfillment values of each input promise, provided every promise resolves successfully.
always(BiFunction<? super T, Throwable, ? extends Promise<? extends U>>) - Method in interface me.joeycumines.javapromises.core.Promise
Specify a callback that will always run on resolution, or as soon as possible if this is already in a resolved state.
always(BiFunction<? super T, Throwable, ? extends Promise<? extends U>>) - Method in class me.joeycumines.javapromises.v1.PromiseRunnable
 
always(BiFunction<? super T, Throwable, ? extends Promise<? extends U>>) - Method in class me.joeycumines.javapromises.v1.PromiseStage
 
any(Promise<? extends T>, Promise<? extends T>...) - Method in class me.joeycumines.javapromises.core.PromiseApi
 
any(Iterable<? extends Promise<? extends T>>) - Method in class me.joeycumines.javapromises.core.PromiseApi
Given an iterable of one or more promises, return a promise, that will fulfill with the value of the first of the input promises that fulfills.
attempt(Supplier<? extends Promise<? extends T>>) - Method in class me.joeycumines.javapromises.core.PromiseApi
Perform an action, and return a promise that will resolve with rejected, if the action throws an exception.
attempt(Runnable) - Method in class me.joeycumines.javapromises.core.PromiseApi
Perform an action, and return a promise that will resolve with rejected, if the action throws an exception.

B

BlockingPromise<T> - Class in me.joeycumines.javapromises.core
Wraps a Promise created using PromiseFactory, so that we can resolve a promise after the fact.
BlockingPromise(PromiseFactory) - Constructor for class me.joeycumines.javapromises.core.BlockingPromise
 

C

CircularResolutionException - Exception in me.joeycumines.javapromises.core
Thrown on the attempted resolution of a completed promise, that forms OR will form a circular reference.
CircularResolutionException(Promise<?>) - Constructor for exception me.joeycumines.javapromises.core.CircularResolutionException
 
create(BiConsumer<Consumer<? super T>, Consumer<Throwable>>) - Method in interface me.joeycumines.javapromises.core.PromiseFactory
Creates a promise, and executes it asynchronously.
create(BiConsumer<Consumer<? super T>, Consumer<Throwable>>) - Method in class me.joeycumines.javapromises.v1.PromiseRunnableFactory
 
create(BiConsumer<Consumer<? super T>, Consumer<Throwable>>) - Method in class me.joeycumines.javapromises.v1.PromiseStageFactory
 

E

each(Iterable<? extends T>, Function<? super T, ? extends Promise<? extends U>>) - Method in class me.joeycumines.javapromises.core.PromiseApi
Given an iterable, perform an asynchronous action on each element serially, similar to Iterable.forEach(Consumer).
except(Function<Throwable, ? extends Promise<? extends T>>) - Method in interface me.joeycumines.javapromises.core.Promise
Specify a callback to be run if this resolves with a failed state REJECTED, and return a new promise, that will resolve with the same state and value as the callback's returned promise, after the callback promise resolves.
except(BiConsumer<Throwable, Consumer<? super T>>) - Method in interface me.joeycumines.javapromises.core.Promise
Specify a callback to be run if this resolves with a failed state REJECTED, and return a new promise, that will fulfill with the value accepted within the callback, into it's second argument, a Consumer.
except(Function<Throwable, ? extends Promise<? extends T>>) - Method in class me.joeycumines.javapromises.v1.PromiseRunnable
 
except(BiConsumer<Throwable, Consumer<? super T>>) - Method in class me.joeycumines.javapromises.v1.PromiseRunnable
 
except(Function<Throwable, ? extends Promise<? extends T>>) - Method in class me.joeycumines.javapromises.v1.PromiseStage
 
except(BiConsumer<Throwable, Consumer<? super T>>) - Method in class me.joeycumines.javapromises.v1.PromiseStage
 
exceptSync() - Method in interface me.joeycumines.javapromises.core.Promise
Calling this method will block until the promise is resolved, returning a value if it resolved with REJECTED, otherwise returning null.
exceptSync() - Method in class me.joeycumines.javapromises.v1.PromiseBase
 
executor - Variable in class me.joeycumines.javapromises.v1.PromiseStage
 
ExecutorRunner - Class in me.joeycumines.javapromises.v1
Directly execute PromiseRunnable instances (promise callbacks, etc) with a provided executor.
ExecutorRunner(Executor) - Constructor for class me.joeycumines.javapromises.v1.ExecutorRunner
 

F

fulfill(T) - Method in class me.joeycumines.javapromises.core.BlockingPromise
 
fulfill(T) - Method in interface me.joeycumines.javapromises.core.PromiseFactory
Create a new promise that is FULFILLED with the provided value.
fulfill(T) - Method in class me.joeycumines.javapromises.v1.PromiseBase
 
fulfill(T) - Method in class me.joeycumines.javapromises.v1.PromiseRunnable
 
fulfill(T) - Method in class me.joeycumines.javapromises.v1.PromiseRunnableFactory
 
fulfill(T) - Method in class me.joeycumines.javapromises.v1.PromiseStageFactory
 

G

getAction() - Method in class me.joeycumines.javapromises.v1.PromiseRunnable
 
getException() - Method in class me.joeycumines.javapromises.v1.PromiseBase
 
getExceptionList() - Method in exception me.joeycumines.javapromises.core.AggregateException
 
getExecutor() - Method in class me.joeycumines.javapromises.v1.PromiseStage
 
getInstance() - Static method in class me.joeycumines.javapromises.v1.ExecutorRunner
Create a new global (singleton, though you can instance others like it manually) executor runner using a new cached thread pool.
getInstance() - Static method in class me.joeycumines.javapromises.v1.PromiseRunnableFactory
 
getInstance() - Static method in class me.joeycumines.javapromises.v1.PromiseStageFactory
 
getPromise() - Method in class me.joeycumines.javapromises.core.BlockingPromise
 
getPromise() - Method in exception me.joeycumines.javapromises.core.CircularResolutionException
 
getPromise() - Method in exception me.joeycumines.javapromises.core.MutatedStateException
 
getPromise() - Method in exception me.joeycumines.javapromises.core.SelfResolutionException
 
getPromise() - Method in exception me.joeycumines.javapromises.v1.RunPromiseException
 
getRunner() - Method in class me.joeycumines.javapromises.v1.PromiseRunnable
 
getStage() - Method in class me.joeycumines.javapromises.v1.PromiseStage
 
getState() - Method in interface me.joeycumines.javapromises.core.Promise
Get the current state of the promise.
getState() - Method in class me.joeycumines.javapromises.v1.PromiseBase
 
getStateNew() - Method in exception me.joeycumines.javapromises.core.MutatedStateException
 
getStateOld() - Method in exception me.joeycumines.javapromises.core.MutatedStateException
 
getValue() - Method in class me.joeycumines.javapromises.v1.PromiseBase
 

I

isRun() - Method in class me.joeycumines.javapromises.v1.PromiseRunnable
 

L

lock - Variable in class me.joeycumines.javapromises.v1.PromiseBase
Use this as a lock against which you can synchronize the state.

M

me.joeycumines.javapromises.core - package me.joeycumines.javapromises.core
 
me.joeycumines.javapromises.v1 - package me.joeycumines.javapromises.v1
 
MutatedStateException - Exception in me.joeycumines.javapromises.core
Thrown if something attempted to change the state of a promise more then once.
MutatedStateException(Promise<?>, PromiseState, PromiseState) - Constructor for exception me.joeycumines.javapromises.core.MutatedStateException
 

P

Promise<T> - Interface in me.joeycumines.javapromises.core
A "promise", the core concept of this class is based on the JavaScript ES6 promise implementation, with adaptions where necessary or where it made more sense.
PromiseApi - Class in me.joeycumines.javapromises.core
Helpers for the creation and use promises.
PromiseApi() - Constructor for class me.joeycumines.javapromises.core.PromiseApi
 
PromiseBase<T> - Class in me.joeycumines.javapromises.v1
A simple thread-safe Promise implementation sans then, except, and always.
PromiseBase() - Constructor for class me.joeycumines.javapromises.v1.PromiseBase
 
PromiseFactory - Interface in me.joeycumines.javapromises.core
Create promises in completion states, or allow them to be run asynchronously.
PromiseRunnable<T> - Class in me.joeycumines.javapromises.v1
First-pass promise implementation.
PromiseRunnable() - Constructor for class me.joeycumines.javapromises.v1.PromiseRunnable
 
PromiseRunnable(PromiseRunner) - Constructor for class me.joeycumines.javapromises.v1.PromiseRunnable
 
PromiseRunnable(PromiseRunner, Consumer<PromiseRunnable<T>>) - Constructor for class me.joeycumines.javapromises.v1.PromiseRunnable
 
PromiseRunnableFactory - Class in me.joeycumines.javapromises.v1
A factory for creating PromiseRunnable instances.
PromiseRunnableFactory(PromiseRunner) - Constructor for class me.joeycumines.javapromises.v1.PromiseRunnableFactory
 
PromiseRunner - Interface in me.joeycumines.javapromises.v1
A manager for executing promises, used internally by PromiseRunnable.
PromiseStage<T> - Class in me.joeycumines.javapromises.v1
This Promise implementation supports the wrapping of the Java 8 interface, CompletionStage.
PromiseStage(CompletionStage<T>) - Constructor for class me.joeycumines.javapromises.v1.PromiseStage
 
PromiseStage(CompletionStage<T>, Executor) - Constructor for class me.joeycumines.javapromises.v1.PromiseStage
 
PromiseStageFactory - Class in me.joeycumines.javapromises.v1
 
PromiseStageFactory() - Constructor for class me.joeycumines.javapromises.v1.PromiseStageFactory
 
PromiseStageFactory(Executor) - Constructor for class me.joeycumines.javapromises.v1.PromiseStageFactory
 
PromiseState - Enum in me.joeycumines.javapromises.core
A promise can have one of three states, pending, fulfilled, or rejected.

R

race(Promise<? extends T>, Promise<? extends T>...) - Method in class me.joeycumines.javapromises.core.PromiseApi
 
race(Iterable<? extends Promise<? extends T>>) - Method in class me.joeycumines.javapromises.core.PromiseApi
Given an iterable of one or more promises, return a promise, that will resolve with the same state and value as the first one that resolves.
reject(Throwable) - Method in class me.joeycumines.javapromises.core.BlockingPromise
 
reject(Throwable) - Method in interface me.joeycumines.javapromises.core.PromiseFactory
Create a new REJECTED promise, with a provided reason for rejection.
reject(Throwable) - Method in class me.joeycumines.javapromises.v1.PromiseBase
 
reject(Throwable) - Method in class me.joeycumines.javapromises.v1.PromiseRunnable
 
reject(Throwable) - Method in class me.joeycumines.javapromises.v1.PromiseRunnableFactory
 
reject(Throwable) - Method in class me.joeycumines.javapromises.v1.PromiseStageFactory
 
resolve(Object, Class<? extends T>) - Method in class me.joeycumines.javapromises.core.PromiseApi
Create a new promise that will fulfill or reject, if given a promise and based on it's state, otherwise simply fulfilling with the value given, provided it can be cast to the given type.
resolve(Promise<? extends T>) - Method in class me.joeycumines.javapromises.v1.PromiseBase
Resolve this promise with the same value/exception and state as another promise.
resolve(Promise<? extends T>) - Method in class me.joeycumines.javapromises.v1.PromiseRunnable
 
resolveAll(Iterable<?>, Class<? extends T>) - Method in class me.joeycumines.javapromises.core.PromiseApi
Copy an iterable into a new ArrayList, performing PromiseApi.resolve(Object, Class) on each element.
run() - Method in class me.joeycumines.javapromises.v1.PromiseRunnable
 
runPromise(PromiseRunnable<T>) - Method in class me.joeycumines.javapromises.v1.ExecutorRunner
 
runPromise(PromiseRunnable<T>) - Method in interface me.joeycumines.javapromises.v1.PromiseRunner
 
RunPromiseException - Exception in me.joeycumines.javapromises.v1
Thrown if there was an error running a promise.

S

SelfResolutionException - Exception in me.joeycumines.javapromises.core
An exception that is triggered if a promise attempts to resolve itself.
SelfResolutionException(Promise<?>) - Constructor for exception me.joeycumines.javapromises.core.SelfResolutionException
 
setAction(Consumer<PromiseRunnable<T>>) - Method in class me.joeycumines.javapromises.v1.PromiseRunnable
 
setRun() - Method in class me.joeycumines.javapromises.v1.PromiseRunnable
 
setRunner(PromiseRunner) - Method in class me.joeycumines.javapromises.v1.PromiseRunnable
 
stage - Variable in class me.joeycumines.javapromises.v1.PromiseStage
 
sync() - Method in interface me.joeycumines.javapromises.core.Promise
Calling this method will block the current thread until this is resolved (not PENDING).
sync() - Method in class me.joeycumines.javapromises.v1.PromiseBase
 

T

then(Function<? super T, ? extends Promise<? extends U>>) - Method in interface me.joeycumines.javapromises.core.Promise
Specify a callback to be run on successful resolution FULFILLED of this, and return a new promise, that will resolve with the same state and value as the callback's returned promise, after the callback promise resolves.
then(BiConsumer<? super T, Consumer<? super U>>) - Method in interface me.joeycumines.javapromises.core.Promise
Specify a callback to be run on successful resolution FULFILLED of this, and return a new promise, that will fulfill with the value accepted within the callback, into it's second argument, a Consumer.
then(Function<? super T, ? extends Promise<? extends U>>) - Method in class me.joeycumines.javapromises.v1.PromiseRunnable
 
then(BiConsumer<? super T, Consumer<? super U>>) - Method in class me.joeycumines.javapromises.v1.PromiseRunnable
 
then(Function<? super T, ? extends Promise<? extends U>>) - Method in class me.joeycumines.javapromises.v1.PromiseStage
 
then(BiConsumer<? super T, Consumer<? super U>>) - Method in class me.joeycumines.javapromises.v1.PromiseStage
 
thenSync() - Method in interface me.joeycumines.javapromises.core.Promise
Calling this method will block until the promise is resolved, returning a value if it resolved with FULFILLED, otherwise returning null.
thenSync() - Method in class me.joeycumines.javapromises.v1.PromiseBase
 
toCompletableFuture(Promise<? extends T>) - Method in class me.joeycumines.javapromises.core.PromiseApi
Convert a promise to a CompletableFuture.

V

valueOf(String) - Static method in enum me.joeycumines.javapromises.core.PromiseState
Returns the enum constant of this type with the specified name.
values() - Static method in enum me.joeycumines.javapromises.core.PromiseState
Returns an array containing the constants of this enum type, in the order they are declared.

W

wrap(Promise<? extends T>) - Method in interface me.joeycumines.javapromises.core.PromiseFactory
Return a promise created by this PromiseFactory, from any given promise, that will resolve in the same way.
wrap(Promise<? extends T>) - Method in class me.joeycumines.javapromises.v1.PromiseRunnableFactory
 
wrap(CompletionStage<T>, Executor, Promise<? extends T>) - Static method in class me.joeycumines.javapromises.v1.PromiseStage
Use a completed CompletionStage as a base, create a new PromiseStage, that will resolve with the same state and value as the provided Promise.
wrap(Promise<? extends T>) - Method in class me.joeycumines.javapromises.v1.PromiseStageFactory
 
A B C E F G I L M P R S T V W 
Skip navigation links