public final class FlowableProcessors extends Object
Modifier and Type | Method and Description |
---|---|
static <T> @NonNull FlowableProcessor<T> |
refCount(FlowableProcessor<T> processor)
Wraps a FlowableProcessor and makes sure if all subscribers cancel
their subscriptions, the upstream's Subscription gets cancelled as well.
|
static <T> FlowableProcessor<T> |
wrap(Processor<T,T> processor)
Wraps an arbitrary Reactive-Streams
Processor into a FlowableProcessor , relaying
the onXXX and subscribe() calls to it and providing a rich fluent API on top. |
public static <T> FlowableProcessor<T> wrap(Processor<T,T> processor)
Processor
into a FlowableProcessor
, relaying
the onXXX and subscribe() calls to it and providing a rich fluent API on top.
Note that RxJava 2 doesn't support a FlowableProcessor with different input and output types.
T
- the input and output typeprocessor
- the processor to wrap (or return if already a FlowableProcessor), not null@NonNull @CheckReturnValue public static <T> @NonNull FlowableProcessor<T> refCount(FlowableProcessor<T> processor)
This operator is similar to ConnectableFlowable.refCount()
except the first Subscriber doesn't trigger any sort of connection; that happens
when the resulting FlowableProcessor is subscribed to a Publisher manually.
T
- the input and output value typeprocessor
- the processor to wrap, not null