@ClientAsyncExecutor public static class ClientExecutorProvidersConfigurator.ClientExecutorServiceProvider extends java.lang.Object implements ExecutorServiceProvider
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.ExecutorService |
executorService |
Constructor and Description |
---|
ClientExecutorServiceProvider(java.util.concurrent.ExecutorService executorService) |
Modifier and Type | Method and Description |
---|---|
void |
dispose(java.util.concurrent.ExecutorService executorService)
Invoked when Jersey runtime no longer requires use of the provided executor service.
|
java.util.concurrent.ExecutorService |
getExecutorService()
Get an executor service to be used by Jersey client or server runtime to execute specific tasks.
|
ClientExecutorServiceProvider(java.util.concurrent.ExecutorService executorService)
public java.util.concurrent.ExecutorService getExecutorService()
ExecutorServiceProvider
This method is usually invoked just once at either Jersey client or server application runtime initialization,
it may however be invoked multiple times. Once the instance of the provided executor service is not
needed anymore by Jersey application runtime, it will be disposed
.
This typically happens in one of the following situations:
getExecutorService
in interface ExecutorServiceProvider
null
.public void dispose(java.util.concurrent.ExecutorService executorService)
ExecutorServiceProvider
dispose
in interface ExecutorServiceProvider
executorService
- executor service to be disposed.