Interface StreamMapper<U,​D>

  • Type Parameters:
    U - the type of item emitted from upstream
    D - the type of item to emit downstream (i.e. post transform)

    public interface StreamMapper<U,​D>
    Fundamentally transforms a stream.
    Since:
    1.4
    See Also:
    Streams.streamMap(Publisher, StreamMapper)
    • Method Detail

      • map

        WriteStream<U> map​(Subscription subscription,
                           WriteStream<D> downstream)
                    throws Exception
        A transform step in a Publisher chain.
        Parameters:
        subscription - the upstream subscription
        downstream - the downstream to write to
        Returns:
        a write stream that receives signals from upstream
        Throws:
        Exception - any error in establishing the mapping