GitHub user rschmitt opened a pull request:

    https://github.com/apache/httpcomponents-core/pull/74

    HTTPCLIENT-1942: Add support for Reactive Streams

    This contribution adds initial support for the [Reactive Streams 
specification](http://www.reactive-streams.org/). The main part of this change 
is a pair of non-public classes, the `ReactiveDataProducer` and 
`ReactiveDataConsumer`, which are reactive adapters for Apache's 
AsyncDataProducer and AsyncDataConsumer interfaces. Two public classes are 
built on top of these types:
    
    * `ReactiveEntityProducer`: An `AsyncEntityProducer` implementation backed 
by `ReactiveDataProducer` that allows a `Publisher<ByteBuffer>` to be streamed 
as a request body
    * `ReactiveResponseConsumer`: An `AsyncResponseConsumer` that exposes the 
overall HTTP response as a `Message<HttpResponse, Publisher<ByteBuffer>>`, 
allowing the body to be consumed by a `Subscriber<ByteBuffer>`
    
    These classes are enough to allow the async Apache client to 
straightforwardly integrate with reactive frameworks like 
[RxJava](https://github.com/ReactiveX/RxJava), [Akka](https://akka.io/), and 
[Vert.x](https://vertx.io/).

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rschmitt/httpcomponents-core reactive

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/httpcomponents-core/pull/74.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #74
    
----
commit 1c4713f40e0175de5c0e3053abc2f1e11a597d57
Author: Ryan Schmitt <ryansch@...>
Date:   2018-08-17T21:16:04Z

    HTTPCLIENT-1942: Add support for Reactive Streams
    
    This commit adds initial support for the Reactive Streams specification
    [1]. The main part of this change is a pair of non-public classes, the
    ReactiveDataProducer and ReactiveDataConsumer, which are reactive
    adapters for Apache's AsyncDataProducer and AsyncDataConsumer
    interfaces. Two public classes are built on top of these types:
    
    * ReactiveEntityProducer: An AsyncEntityProducer implementation backed
      by ReactiveDataProducer that allows a Publisher<ByteBuffer> to be
      streamed as a request body
    * ReactiveResponseConsumer: An AsyncResponseConsumer that exposes the
      overall HTTP response as a Message<HttpResponse, Publisher<ByteBuffer>>,
      allowing the body to be consumed by a Subscriber<ByteBuffer>
    
    [1] http://www.reactive-streams.org/

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to