- Type Parameters:
T
- the value type.
- All Implemented Interfaces:
Flow.Processor<CompletionStage<T>,
,T> Flow.Publisher<T>
,Flow.Subscriber<CompletionStage<T>>
Emits the values produced by the stages in the order the stages arrive. The stream completes only
after the last stage has completed.
- Since:
- 1.5
- Author:
- Werner Donné
-
Field Summary
Fields inherited from class net.pincette.rs.ProcessorBase
subscriber, subscription
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Flow.Processor<CompletionStage<T>,
T> async()
protected void
emit
(long number) static <T,
R> Flow.Processor<T, R> mapAsync
(Function<T, CompletionStage<R>> function) Returns a processor with the mapping function, which transforms the objects.void
void
onNext
(CompletionStage<T> stage) Methods inherited from class net.pincette.rs.ProcessorBase
cancel, complete, getError, onError, onSubscribe, setError, subscribe
-
Constructor Details
-
Async
public Async()
-
-
Method Details
-
async
-
mapAsync
Returns a processor with the mapping function, which transforms the objects. The completion stages are processed in the order of the stream, which completes only after the last stage is completed. This means the functions may start in parallel, but the completions are emitted in the proper order.- Type Parameters:
T
- the incoming value type.R
- the outgoing value type.- Parameters:
function
- the mapping function.- Returns:
- The processor.
- Since:
- 3.0
-
emit
protected void emit(long number) - Specified by:
emit
in classProcessorBase<CompletionStage<T>,
T>
-
onComplete
public void onComplete()- Specified by:
onComplete
in interfaceFlow.Subscriber<T>
- Overrides:
onComplete
in classProcessorBase<CompletionStage<T>,
T>
-
onNext
-