Package org.glassfish.jersey.client
Class ClientExecutorProvidersConfigurator.ClientExecutorServiceProvider
java.lang.Object
org.glassfish.jersey.client.ClientExecutorProvidersConfigurator.ClientExecutorServiceProvider
- All Implemented Interfaces:
ExecutorServiceProvider
- Enclosing class:
ClientExecutorProvidersConfigurator
@ClientAsyncExecutor
public static class ClientExecutorProvidersConfigurator.ClientExecutorServiceProvider
extends Object
implements ExecutorServiceProvider
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose
(ExecutorService executorService) Invoked when Jersey runtime no longer requires use of the provided executor service.Get an executor service to be used by Jersey client or server runtime to execute specific tasks.
-
Field Details
-
executorService
-
-
Constructor Details
-
ClientExecutorServiceProvider
ClientExecutorServiceProvider(ExecutorService executorService)
-
-
Method Details
-
getExecutorService
Description copied from interface:ExecutorServiceProvider
Get an executor service to be used by Jersey client or server runtime to execute specific tasks.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:- Jersey client instance is closed (client runtime is shut down).
- Jersey container running a server-side Jersey application is shut down.
- Jersey server-side application is un-deployed.
- Specified by:
getExecutorService
in interfaceExecutorServiceProvider
- Returns:
- an executor service. Must not return
null
.
-
dispose
Description copied from interface:ExecutorServiceProvider
Invoked when Jersey runtime no longer requires use of the provided executor service.- Specified by:
dispose
in interfaceExecutorServiceProvider
- Parameters:
executorService
- executor service to be disposed.
-