[
https://issues.apache.org/jira/browse/HTTPCLIENT-1942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16586926#comment-16586926
]
ASF GitHub Bot commented on HTTPCLIENT-1942:
--------------------------------------------
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/
----
> Add support for Reactive Streams
> --------------------------------
>
> Key: HTTPCLIENT-1942
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1942
> Project: HttpComponents HttpClient
> Issue Type: Wish
> Components: HttpClient (async)
> Affects Versions: 5.0 Beta1
> Reporter: Ryan Schmitt
> Priority: Major
> Labels: stuck, volunteers-wanted
> Fix For: Future
>
>
> It would be very helpful to me if the Apache client provided an
> implementation of the [Reactive Streams|http://www.reactive-streams.org/]
> spec, particularly as an implementation of the standard
> [interfaces|https://search.maven.org/artifact/org.reactivestreams/reactive-streams/1.0.2/jar].
> These interfaces are JDK6-compatible and have no other dependencies, but
> they unlock interoperability with many other frameworks, such as RxJava.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]