Branch: refs/heads/main
Home:
https://github.com/resteasy/Resteasy
Commit: b6879670555785137c56bad59a4581b6dc56077c
https://github.com/resteasy/Resteasy/commit/b6879670555785137c56bad59a458...
Author: Samuel Cox <crankydillo(a)gmail.com>
Date: 2021-06-24 (Thu, 24 Jun 2021)
Changed paths:
M docbook/reference/en/en-US/modules/RESTEasy_Client_Framework.xml
A
resteasy-client-api/src/main/java/org/jboss/resteasy/client/jaxrs/PublisherRxInvoker.java
M
resteasy-client-reactor-netty/src/main/java/org/jboss/resteasy/client/jaxrs/engines/ReactorNettyClientHttpEngine.java
A
resteasy-client/src/main/java/org/jboss/resteasy/client/jaxrs/engines/ReactiveClientHttpEngine.java
M
resteasy-client/src/main/java/org/jboss/resteasy/client/jaxrs/internal/ClientInvocation.java
A
resteasy-client/src/main/java/org/jboss/resteasy/client/jaxrs/internal/PublisherRxInvokerImpl.java
M resteasy-reactor/pom.xml
M resteasy-reactor/src/main/java/org/jboss/resteasy/reactor/MonoRxInvoker.java
M resteasy-reactor/src/main/java/org/jboss/resteasy/reactor/MonoRxInvokerImpl.java
M
resteasy-reactor/src/main/java/org/jboss/resteasy/reactor/MonoRxInvokerProvider.java
M resteasy-reactor/src/test/java/org/jboss/resteasy/reactor/ReactorResource.java
M resteasy-reactor/src/test/java/org/jboss/resteasy/reactor/ReactorTest.java
M resteasy-rxjava2/src/main/java/org/jboss/resteasy/rxjava2/SingleRxInvokerImpl.java
M
resteasy-rxjava2/src/main/java/org/jboss/resteasy/rxjava2/SingleRxInvokerProvider.java
Log Message:
-----------
[RESTEASY-2943] Support reactive publishers at the engine level. (#2463)
* Support reactive publishers at the engine level.
This is a PoC that aims to support a more 'direct' line from `rx(Class)`
to a reactive 'provider'. Some reactive implementations have features
that can be better leveraged with this. In our case, we really need to
leverage the end user's project-reactor 'context' when we build the
client. This use case is exercised in the
ReactorTest#testSubscriberContext test.
Some things like code reuse and test coverage have been postponed until
I get some feedback on the concept.
Apologies for not writing up an issue. We already had this code written
so I'm hoping it better explains what we need than trying to write it up
in an issue. Just let me know what you'd like me to do that in that
regard.
* Another use case for making a more direct bridge from a `rx(Class)`..
returned Publisher. Similar to the context case, if the user sets a
timeout on the publisher you get from rx(..), that should effectively
cancel the inner publisher if it times out. For reactor-netty, this
gives the end-user the ability to use a per-request timeout such that
the their logic terminates _and_ the connection is released as soon as
possible.
* Make it more apparent that reactive functionality of ClientInvocation
is optional and contigent upon the HTTP engine. This allows for clients
to cleanly fall back to a `CompletionStage` approach if they think that
is a good fit for their needs.
* Refactor RxJava2's SingleMonoRxImpl to leverage PublisherRxInvokerImpl..
For reactive HTTP client engines, this eliminates the completion stage
bridge, which can be problematic for multiple reasons.
* Address checkstyle issues.
* Remove silly functions..
I had some plans to use those from generic code, but that didn't work
out.
* Clear rxjava2 checkstyle errors
* More checkstyle fixes.
* Revert "Refactor RxJava2's SingleMonoRxImpl to leverage
PublisherRxInvokerImpl.."
This reverts commit 24e5bbfe
* Rename `PublisherRx...` to `UniPublisherRx...` ..
to give a better indication these are 'publishers' of single items.
* Revert "Rename `PublisherRx...` to `UniPublisherRx...` .."
This reverts commit cf5bc152abf62f05652dcaa6276de8016f050512.
* Fix SingleRxInvokerProvider and rebase issue.
* Bring back junit dependency.
* Add a test showing that a business logic timeout will cause eager..
connection closing.
* Add a note about one of the benefits of using the reactor-netty engine..
with the `MonoRxInvoker`.
* Make sure the embedded server is closed.
* Update RESTEasy_Client_Framework.xml
* Move PublisherRxInvoker to resteasy-client-api.
Co-authored-by: Samuel Cox <sacox(a)paypal.com>
Co-authored-by: Ron Sigal <rsigal(a)redhat.com>