public abstract class

FlowableProcessor

extends Flowable<T>
implements FlowableSubscriber<T> Processor<T, R>
java.lang.Object
   ↳ io.reactivex.Flowable<T>
     ↳ io.reactivex.processors.FlowableProcessor<T>
Known Direct Subclasses

Class Overview

Represents a Subscriber and a Flowable (Publisher) at the same time, allowing multicasting events from a single source to multiple child Subscribers.

All methods except the onSubscribe, onNext, onError and onComplete are thread-safe. Use toSerialized() to make these methods thread-safe as well.

Summary

Public Constructors
FlowableProcessor()
Public Methods
abstract Throwable getThrowable()
Returns the error that caused the Subject to terminate or null if the Subject hasn't terminated yet.
abstract boolean hasComplete()
Returns true if the subject has reached a terminal state through a complete event.
abstract boolean hasSubscribers()
Returns true if the subject has subscribers.
abstract boolean hasThrowable()
Returns true if the subject has reached a terminal state through an error event.
final FlowableProcessor<T> toSerialized()
Wraps this Subject and serializes the calls to the onSubscribe, onNext, onError and onComplete methods, making them thread-safe.
[Expand]
Inherited Methods
From class io.reactivex.Flowable
From class java.lang.Object
From interface io.reactivex.FlowableSubscriber
From interface org.reactivestreams.Publisher
From interface org.reactivestreams.Subscriber

Public Constructors

public FlowableProcessor ()

Public Methods

public abstract Throwable getThrowable ()

Returns the error that caused the Subject to terminate or null if the Subject hasn't terminated yet.

The method is thread-safe.

Returns
  • the error that caused the Subject to terminate or null if the Subject hasn't terminated yet

public abstract boolean hasComplete ()

Returns true if the subject has reached a terminal state through a complete event.

The method is thread-safe.

Returns
  • true if the subject has reached a terminal state through a complete event
See Also

public abstract boolean hasSubscribers ()

Returns true if the subject has subscribers.

The method is thread-safe.

Returns
  • true if the subject has subscribers

public abstract boolean hasThrowable ()

Returns true if the subject has reached a terminal state through an error event.

The method is thread-safe.

Returns
  • true if the subject has reached a terminal state through an error event

public final FlowableProcessor<T> toSerialized ()

Wraps this Subject and serializes the calls to the onSubscribe, onNext, onError and onComplete methods, making them thread-safe.

The method is thread-safe.

Returns
  • the wrapped and serialized subject