JavaScript is disabled on your browser.
Skip navigation links
io.reactivex.subscribers

Class SerializedSubscriber<T>

  • Type Parameters:
    T - the value type
    All Implemented Interfaces:
    FlowableSubscriber<T>, Subscriber<T>, Subscription


    public final class SerializedSubscriber<T>
    extends Object
    implements FlowableSubscriber<T>, Subscription 
    Serializes access to the onNext, onError and onComplete methods of another Subscriber.

    Note that onSubscribe(Subscription) is not serialized in respect of the other methods so make sure the onSubscribe is called with a non-null Subscription before any of the other methods are called.

    The implementation assumes that the actual Subscriber's methods don't throw.

    • Constructor Detail

      • SerializedSubscriber

        public SerializedSubscriber(Subscriber<? super T> downstream)
        Construct a SerializedSubscriber by wrapping the given actual Subscriber.
        Parameters:
        downstream - the actual Subscriber, not null (not verified)
      • SerializedSubscriber

        public SerializedSubscriber(Subscriber<? super T> actual,
         boolean delayError)
        Construct a SerializedSubscriber by wrapping the given actual Observer and optionally delaying the errors till all regular values have been emitted from the internal buffer.
        Parameters:
        actual - the actual Subscriber, not null (not verified)
        delayError - if true, errors are emitted after regular values have been emitted
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /