public class Promise<T> extends Object
| Modifier and Type | Method and Description |
|---|---|
Throwable |
cause() |
void |
complete() |
void |
complete(T value) |
static <T> Promise<T> |
create() |
static <T> Promise<T> |
create(Supplier<T> supplier) |
void |
fail(Throwable throwable) |
Boolean |
failed() |
static <T> Promise<T> |
failed(Throwable throwable) |
T |
get() |
T |
result() |
Boolean |
succeded() |
static Promise<Void> |
succeeded() |
static <T> Promise<T> |
succeeded(T value) |
public static <T> Promise<T> create()
public static <T> Promise<T> succeeded(T value)
public void complete()
public void complete(T value)
public void fail(Throwable throwable)
public T get()
public Boolean succeded()
public Boolean failed()
public Throwable cause()
public T result()
Copyright © 2020. All rights reserved.