Package graphql.execution.reactive
Class CompletionStageMappingPublisher<D,U>
java.lang.Object
graphql.execution.reactive.CompletionStageMappingPublisher<D,U>
- Type Parameters:
D
- the down stream typeU
- the up stream type to be mapped to
- All Implemented Interfaces:
org.reactivestreams.Publisher<D>
public class CompletionStageMappingPublisher<D,U>
extends Object
implements org.reactivestreams.Publisher<D>
A reactive Publisher that bridges over another Publisher of `D` and maps the results
to type `U` via a CompletionStage, handling errors in that stage
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Function
<U, CompletionStage<D>> private final org.reactivestreams.Publisher
<U> -
Constructor Summary
ConstructorsConstructorDescriptionCompletionStageMappingPublisher
(org.reactivestreams.Publisher<U> upstreamPublisher, Function<U, CompletionStage<D>> mapper) You need the following : -
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher
<U> Get instance of an upstreamPublishervoid
-
Field Details
-
upstreamPublisher
-
mapper
-
-
Constructor Details
-
CompletionStageMappingPublisher
public CompletionStageMappingPublisher(org.reactivestreams.Publisher<U> upstreamPublisher, Function<U, CompletionStage<D>> mapper) You need the following :- Parameters:
upstreamPublisher
- an upstream source of datamapper
- a mapper function that turns upstream data into a promise of mapped D downstream data
-
-
Method Details
-
subscribe
- Specified by:
subscribe
in interfaceorg.reactivestreams.Publisher<D>
-
getUpstreamPublisher
Get instance of an upstreamPublisher- Returns:
- upstream instance of
Publisher
-