12 questions
3
votes
1
answer
802
views
Synchronous SubmissionPublisher
Is it possible to make Subscriber run on the same thread as the Publisher (synchronously)?
I can use CompletableFuture, but it delivers only a single result. But what if I need many results delivered ...
1
vote
2
answers
134
views
Why can I not access class variables from onComplete in Flow API Subscriber
Using the Java Flow API. I have a chain of Processors and a terminal Subscriber.
I have coded up Subscribers that have kept a count of items received that work fine with a SubmissionPublisher.
However,...
18
votes
2
answers
11k
views
How to read the body of a HttpRequest in Java 11?
In a test, I'd like to look inside the body of a HttpRequest. I'd like to get the body as a string. It seems that the only way to do that, is to subscribe to the BodyPublisher but how does that work?
2
votes
2
answers
1k
views
Jasperreport problem wtih subreport using javaflow
I have a problem with subreport using javaflow with Jasperreport 6.7.0 according to The Definitive Guide to JasperReports – Teodor Danciu, Lucian Chirita, page 130. I need it to avoid different ...
0
votes
0
answers
465
views
java reactive flow - can a subscriber return value?
I am trying to implement java reactive flow (observer design patter).
I made use of samples available. i have no problem sending values to the subscribers but i cannot make the subscriber to send ...
5
votes
2
answers
2k
views
Publishing data on java 9 Flow to subscribers in a way that only one subscriber will consume it
Is there a way to publish data to subscribers in a way that only one subscriber will receive it ?
What i am trying to achieve is that the subscriber publisher model will work as a queue that has ...
5
votes
1
answer
1k
views
Java Flow.Subscriber - How can I unsubscribe?
I'm creating an user event system using JDK 9 Flow API, so I have a room (which implements Flow.Subscriber<Notification>), it may have many users and each user can offer (dispatch) updates at ...
3
votes
0
answers
927
views
Java Flow.Subscriber - How can I get the publisher of onComplete?
I'm creating an user event system using JDK 9 Flow API, so I have a room (which extends the UserSubscriver class above), it may have many users and each user can offer (dispatch) updates at any time.
...
3
votes
3
answers
1k
views
Good implementation/support for java.util.concurrent.Flow.Processor<T,R>
Recently, I found a good support for Publisher by projectreactor.io:
Flux.create(fluxSink -> {
for (int i = 0; i < 10; i++)
fluxSink.next(i);
fluxSink.complete(...
5
votes
3
answers
463
views
Run Flow in main thread
Again I´m comparing RxJava with Java 9 Flow. I see that Flow by default is asynchronously, and I was wondering if there´s a way to make it run synchronously.
Sometimes we just want to use it not for ...
4
votes
2
answers
2k
views
Java 9 Flow define subscriber with lambdas
I start playing with Java 9 Flow API, and the first thing that I found and dont like, it´s seems like we cannot use lambdas when we pass a subscriber implementation into the publisher as we can do ...
6
votes
2
answers
2k
views
Java 9 Behavior of Flow SubmissionPublisher offer method
I´ve been playing with Java Flow offer operator but after read the documentation and do my test I dont understand.
Here my test
@Test
public void offer() throws InterruptedException {
//Create ...