R - the return value type of the internal Supplier<R>.public class CompletionSupplier<R> extends Object
Completes<T> outcome by way of CompletesEventually.
Used by Sourced, ObjectEntity, and StateEntity to provide answers
from methods that complete asynchronously to the original message delivery.| Modifier and Type | Method and Description |
|---|---|
void |
complete()
Completes the outcome by executing the
Supplier<T> for its answer. |
static <RO> CompletionSupplier<RO> |
supplierOrNull(Supplier<RO> supplier,
CompletesEventually completes)
Answer a new instance of
CompletionSupplier<R> if the supplier is not null;
otherwise answer null. |
public static <RO> CompletionSupplier<RO> supplierOrNull(Supplier<RO> supplier, CompletesEventually completes)
CompletionSupplier<R> if the supplier is not null;
otherwise answer null.RO - the return type of the given supplier, if anysupplier - the Supplier<RO> of the eventual outcome, or null if none is providedcompletes - the CompletesEventually through which the eventual outcome is sentCompletionSupplier<RO>public void complete()
Supplier<T> for its answer.Copyright © 2021. All rights reserved.