@ClientBackgroundScheduler public static class ClientExecutorProvidersConfigurator.ClientScheduledExecutorServiceProvider extends java.lang.Object implements ScheduledExecutorServiceProvider
Modifier and Type | Field and Description |
---|---|
private Value<java.util.concurrent.ScheduledExecutorService> |
executorService |
Constructor and Description |
---|
ClientScheduledExecutorServiceProvider(Value<java.util.concurrent.ScheduledExecutorService> 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.ScheduledExecutorService |
getExecutorService()
Get a scheduled executor service to be used by Jersey client or server runtime to schedule execution of
specific tasks.
|
private final Value<java.util.concurrent.ScheduledExecutorService> executorService
ClientScheduledExecutorServiceProvider(Value<java.util.concurrent.ScheduledExecutorService> executorService)
public java.util.concurrent.ScheduledExecutorService getExecutorService()
ScheduledExecutorServiceProvider
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 scheduled 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
getExecutorService
in interface ScheduledExecutorServiceProvider
null
.public void dispose(java.util.concurrent.ExecutorService executorService)
ExecutorServiceProvider
dispose
in interface ExecutorServiceProvider
executorService
- executor service to be disposed.