Package: groovy.http

## [Groovy] Class HttpStreamResult.MappedPublisher

- groovy.http.HttpStreamResult.MappedPublisher

- All Implemented Interfaces and Traits:
    Flow.Publisher<Object>

      static final class HttpStreamResult.MappedPublisher
      extends Object
      implements Flow.Publisher<Object>

  One-shot mapping Flow.Publisher that delegates subscription to a source publisher and applies a transformer per signalled item.

  Since:
    6.0.0

- - ### Constructor Summary

    Constructors
    Constructor and description
    `MappedPublisher(Publisher source, Closure mapper)` Creates a publisher that maps each upstream item before emission.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `void` | `subscribe(Flow.Subscriber<? super Object> downstream)` Subscribes downstream and inserts a mapping subscriber between both ends.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MappedPublisher(Publisher source, Closure mapper)

      Creates a publisher that maps each upstream item before emission.

      Parameters:
        `source` - the upstream publisher
        `mapper` - the mapping closure

  - ### Method Detail

    - #### @Override
      void subscribe(Flow.Subscriber<? super Object> downstream)

      Subscribes downstream and inserts a mapping subscriber between both ends.

      Parameters:
        `downstream` - the subscriber receiving mapped items