Skip to main content

All Questions

Tagged with
3 votes
1 answer
135 views

Java combining async and separate threads, slow performance

I have the following function that returns a list that would contain the names of the audio files, once they are downloaded: List<CompletableFuture<String>> getAudios(List<String> ...
parsecer's user avatar
  • 5,172
0 votes
1 answer
30 views

Mocking Object Initialization In a Spring Webflux Asynchronous Call

The myService class contains the myMethod method that asyinitializes a new Auth object (external-library) and executes the doAction() function. public String myMethod(String param1, String param2) { ...
Kitt's user avatar
  • 3
3 votes
0 answers
33 views

Does `AsynchronousSocketChannel.write` and `read` methods apply a memory fence before calling the `CompletionHandler` methods?

When using AsynchronousSocketChannel.write to transmit a message, class Transmitter(channel: AsynchronousSocketChannel) { def transmit(bytes: Array[Byte])(onComplete: Consumer[String]): ...
Readren's user avatar
  • 1,270
0 votes
1 answer
45 views

Display Product data from BillingClient

I have made the following BillingManager class to handle the Google Play Billing Library for my Android app: public class BillingManager { private List<ProductDetails> productDetailsList; ...
Tennis Heal's user avatar
0 votes
1 answer
48 views

Warning about generic wildcard when returning Future object

I'm wondering why do I get warning message when I am trying to return Future object with generic wildcard, or maybe I dont have to worry about it at all? My code: public static Future<?> ...
Filip Baszak's user avatar
0 votes
1 answer
138 views

How to configure asynchronous processors with StepBuilder in Spring batch v5.2

StepBuilderFactory is deprecated and scheduled for removal in v5.2 in favor of using the StepBuilder. I use StepBuilder to build my steps. Now I want to implement asynchronous processors using ...
3omar's user avatar
  • 170
1 vote
0 answers
76 views

Java grpc client batches message responses for async unary calls

We have the following code that is used to retrieve events from a gRPC server on our backend and then resolve events (in the order they are received). It's supposed to do this asynchronously to ...
Finn's user avatar
  • 11
0 votes
1 answer
38 views

What is the proper way to make a search call in async mode in unboundId ldap sdk for java?

Based on https://docs.ldap.com/ldap-sdk/docs/getting-started/asynchronous.html I try to implement a function which will return entry by DN in async manner. So my code is: val searchRequest = ...
gstackoverflow's user avatar
0 votes
0 answers
63 views

SSE Async API in Spring MVC throws Error IllegalStateException: Cannot call sendError() after the response has been committed

I have Spring MVC Service with SSE API having controller return type ResponseEntity<SseEmitter>. and in background Async thread, we send continuous data messages to the client over SseEmitter @...
chetan madnaik's user avatar
0 votes
1 answer
75 views

Testing Async (ApplicationModuleListener) exception throwing

I am trying to test an async listener method - annotated with @ApplicationModuleListener (this is important for other aspects of an app, so this itself is not any problem), which I see is also ...
jakub_k's user avatar
  • 99
0 votes
0 answers
110 views

How asynchrony works in Spring Framework?

How to asynchronously execute this method? I read on the Internet and it says that by default Spring is not asynchronous. But I noticed a strange feature: when testing this endpoint using Postman with ...
Steffano Aravico's user avatar
0 votes
0 answers
18 views

JBoss EAP 6 EJB - how to wait for response synchronously from JMS

I want to send message to AMQ and wait for synchronous reply, in case of error, throws application exception. I have 4 solutions: MessageReceiver.receive() (waits indefinitely, current impl. but is ...
WesternGun's user avatar
  • 12.9k
-1 votes
1 answer
65 views

Failing JWT Authentication in spring with async requests

Hello everyone I wrote an api Backend in Spring and added jwt Authentication. The problem is that I wrote everything async and now the Authentication doesnt work with the async methodes. The token is ...
Luca Roverati's user avatar
0 votes
0 answers
11 views

EventBus with undeploy verticle

This is a code example: public class EventTest { public static void main(String[] args) { var latch = new CountDownLatch(1); var vertx = Vertx.vertx(); vertx.eventBus()....
hdfg159's user avatar
0 votes
0 answers
40 views

Is my non-blocking POST request retry logic using CompletableFuture overcomplicated?

I am implementing a non-blocking retry logic for a POST request in Java using CompletableFuture. The goal is to retry the request up to n times and return the final result (either success or failure) ...
lastpeony4's user avatar

15 30 50 per page
1
2 3 4 5
211