public interface ReactiveStreamsEngine
The zero argument build
and run
methods on subclasses of this will use
the ServiceLoader
to load an engine for the current context classloader. It does not cache
engines between invocations. If instantiating an engine is expensive (eg, it creates threads), then it is
recommended that the implementation does its own caching by providing the engine using a static provider method.
Modifier and Type | Method and Description |
---|---|
<T> CompletionStage<T> |
buildCompletion(Graph graph)
Build a closed graph from the given stages.
|
<T,R> org.reactivestreams.Processor<T,R> |
buildProcessor(Graph graph)
Build a
Processor from the given stages. |
<T> org.reactivestreams.Publisher<T> |
buildPublisher(Graph graph)
Build a
Publisher from the given stages. |
<T,R> SubscriberWithCompletionStage<T,R> |
buildSubscriber(Graph graph)
Build a
Subscriber from the given stages. |
<T> org.reactivestreams.Publisher<T> buildPublisher(Graph graph) throws UnsupportedStageException
Publisher
from the given stages.
The passed in graph will have an outlet and no inlet.
T
- The type of elements that the publisher publishes.graph
- The stages to build the publisher from. Will not be empty.UnsupportedStageException
- If a stage in the stages is not supported by this Reactive Streams engine.<T,R> SubscriberWithCompletionStage<T,R> buildSubscriber(Graph graph) throws UnsupportedStageException
Subscriber
from the given stages.
The passed in graph will have an inlet and no outlet.
T
- The type of elements that the subscriber subscribes to.R
- The result of subscribing to the stages.graph
- The graph to build the subscriber from. Will not be empty.UnsupportedStageException
- If a stage in the stages is not supported by this Reactive Streams engine.<T,R> org.reactivestreams.Processor<T,R> buildProcessor(Graph graph) throws UnsupportedStageException
Processor
from the given stages.
The passed in graph will have an inlet and an outlet.
T
- The type of elements that the processor subscribes to.R
- The type of elements that the processor publishes.graph
- The graph to build the processor from. If empty, then the processor should be an identity processor.UnsupportedStageException
- If a stage in the stages is not supported by this Reactive Streams engine.<T> CompletionStage<T> buildCompletion(Graph graph) throws UnsupportedStageException
The passed in graph will have no inlet and no outlet.
T
- The type of the result of running the closed graph.graph
- The graph to build the closed graph from. Will not be empty.UnsupportedStageException
- If a stage in the stages is not supported by this reactive streams engine.Copyright © 2019 Eclipse Foundation. All rights reserved.