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 java.lang.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 Modifier and Type Class Description class
CompletionStageMappingPublisher.CompletionStageSubscriber
-
Constructor Summary
Constructors Constructor Description CompletionStageMappingPublisher(org.reactivestreams.Publisher<U> upstreamPublisher, java.util.function.Function<U,java.util.concurrent.CompletionStage<D>> mapper)
You need the following :
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.reactivestreams.Publisher<U>
getUpstreamPublisher()
Get instance of an upstreamPublishervoid
subscribe(org.reactivestreams.Subscriber<? super D> downstreamSubscriber)
-
-
-
Constructor Detail
-
CompletionStageMappingPublisher
public CompletionStageMappingPublisher(org.reactivestreams.Publisher<U> upstreamPublisher, java.util.function.Function<U,java.util.concurrent.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 Detail
-
subscribe
public void subscribe(org.reactivestreams.Subscriber<? super D> downstreamSubscriber)
- Specified by:
subscribe
in interfaceorg.reactivestreams.Publisher<D>
-
getUpstreamPublisher
public org.reactivestreams.Publisher<U> getUpstreamPublisher()
Get instance of an upstreamPublisher- Returns:
- upstream instance of
Publisher
-
-