Interface ConnectingOperators<T>
- Type Parameters:
T
- The type of the elements that the stream emits.
- All Known Subinterfaces:
ProcessorBuilder<T,
,R> PublisherBuilder<T>
public interface ConnectingOperators<T>
Operators for connecting different graphs together.
-
Method Summary
Modifier and TypeMethodDescription<R> ProducesResult<R>
to
(SubscriberBuilder<? super T, ? extends R> subscriberBuilder) Connect the outlet of this stream to the givenSubscriberBuilder
graph.Connect the outlet of thePublisher
built by this builder to the givenSubscriber
.<R> ConnectingOperators<R>
via
(ProcessorBuilder<? super T, ? extends R> processorBuilder) Connect the outlet of thePublisher
built by this builder to the givenProcessorBuilder
.<R> ConnectingOperators<R>
Connect the outlet of this stream to the givenProcessor
.
-
Method Details
-
to
Connect the outlet of thePublisher
built by this builder to the givenSubscriber
. The Reactive Streams specification states that a subscriber should cancel any new stream subscription it receives if it already has an active subscription. The returned result of this method is a stream that creates a subscription for the subscriber passed in, so the resulting stream should only be run once. For the same reason, the subscriber passed in should not have any active subscriptions and should not be used in more than one call to this method.- Parameters:
subscriber
- The subscriber to connect.- Returns:
- A completion builder that completes when the stream completes.
-
to
Connect the outlet of this stream to the givenSubscriberBuilder
graph. The Reactive Streams specification states that a subscriber should cancel any new stream subscription it receives if it already has an active subscription. For this reason, a subscriber builder, particularly any that represents a graph that includes a user suppliedSubscriber
orProcessor
stage, should not be used in the creation of more than one stream instance.- Parameters:
subscriberBuilder
- The subscriber builder to connect.- Returns:
- A completion builder that completes when the stream completes.
-
via
Connect the outlet of thePublisher
built by this builder to the givenProcessorBuilder
. The Reactive Streams specification states that a subscribing processor should cancel any new stream subscription it receives if it already has an active subscription. For this reason, a processor builder, particularly any that represents a graph that includes a user suppliedProcessor
stage, should not be used in the creation of more than one stream instance.- Parameters:
processorBuilder
- The processor builder to connect.- Returns:
- A stream builder that represents the passed in processor's outlet.
-
via
Connect the outlet of this stream to the givenProcessor
. The Reactive Streams specification states that a subscribing processor should cancel any new stream subscription it receives if it already has an active subscription. The returned result of this method is a stream that creates a subscription for the processor passed in, so the resulting stream should only be run once. For the same reason, the processor passed in should not have any active subscriptions and should not be used in more than one call to this method.- Parameters:
processor
- The processor builder to connect.- Returns:
- A stream builder that represents the passed in processor builder's outlet.
-