Class ResultStreamPublisher<M>

  • Type Parameters:
    M - the type of element consumed from the underlying stream
    All Implemented Interfaces:
    org.reactivestreams.Publisher<M>

    public class ResultStreamPublisher<M>
    extends Object
    implements org.reactivestreams.Publisher<M>
    Publisher implementation that allows to interact with a ResultStream.

    When subscribed, it generates a new ResultStream through the provided supplier. The generated ResultStream provides the elements to be published.

    Since:
    4.6.0
    Author:
    Sara Pellegrini
    • Constructor Detail

      • ResultStreamPublisher

        public ResultStreamPublisher​(Supplier<ResultStream<M>> resultStreamSupplier)
        Constructs an instance based on the specifier supplier of underlying ResultStream.
        Parameters:
        resultStreamSupplier - supplier of ResultStream used to generate the underlying stream when the publisher is subscribed
    • Method Detail

      • subscribe

        public void subscribe​(org.reactivestreams.Subscriber<? super M> s)
        Specified by:
        subscribe in interface org.reactivestreams.Publisher<M>