Class FlowAdapters.FlowToReactiveSubscriber<T>

  • Type Parameters:
    T - the element type
    All Implemented Interfaces:
    java.util.concurrent.Flow.Subscriber<T>
    Enclosing class:
    FlowAdapters

    static final class FlowAdapters.FlowToReactiveSubscriber<T>
    extends java.lang.Object
    implements java.util.concurrent.Flow.Subscriber<T>
    Wraps a Reactive Streams Subscriber and forwards methods of the Flow Subscriber to it.
    • Field Detail

      • reactiveStreams

        final Subscriber<? super T> reactiveStreams
    • Constructor Detail

      • FlowToReactiveSubscriber

        public FlowToReactiveSubscriber​(Subscriber<? super T> reactive)
    • Method Detail

      • onSubscribe

        public void onSubscribe​(java.util.concurrent.Flow.Subscription subscription)
        Specified by:
        onSubscribe in interface java.util.concurrent.Flow.Subscriber<T>
      • onNext

        public void onNext​(T item)
        Specified by:
        onNext in interface java.util.concurrent.Flow.Subscriber<T>
      • onError

        public void onError​(java.lang.Throwable throwable)
        Specified by:
        onError in interface java.util.concurrent.Flow.Subscriber<T>
      • onComplete

        public void onComplete()
        Specified by:
        onComplete in interface java.util.concurrent.Flow.Subscriber<T>