Search code examples
javajerseyjersey-clientasynccallback

JerseyClient how async call backs are handled?


I understand how to make InvocationCallback in Jersey. But I am not able to get which thread would Jersey use to handle these call back requests.

Does it create a new thread everytime using Executor Service or uses a Pool?

I am looking into Jersey documentation

https://eclipse-ee4j.github.io/jersey.github.io/documentation/latest/async.html And gone through some documentation

https://eclipse-ee4j.github.io/jersey.github.io/apidocs/snapshot/jersey/org/glassfish/jersey/client/ClientProperties.html#ASYNC_THREADPOOL_SIZE

If I pass a Async_thread_pool_size then will this pool be used for callbacks as well?

Thanks


Solution

  • A threadpool is created either based on thread pool property passed or one that creates a new thread everytime Jersey InvocationCallback Completed: Which thread is used to invoke these methods