Class ExecutorProviders
java.lang.Object
org.glassfish.jersey.process.internal.ExecutorProviders
A utility class with a methods for handling executor injection registration and proper disposal.
- Author:
- Marek Potociar
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
registerExecutorBindings
(InjectionManager injectionManager) Create qualifiedExecutorService
andScheduledExecutorService
injection bindings based on the registered providers implementing theExecutorServiceProvider
and/orScheduledExecutorServiceProvider
SPI.static void
registerExecutorBindings
(InjectionManager injectionManager, List<ExecutorServiceProvider> executorProviders, List<ScheduledExecutorServiceProvider> scheduledProviders) Create qualifiedExecutorService
andScheduledExecutorService
injection bindings based on the registered providers implementing theExecutorServiceProvider
and/orScheduledExecutorServiceProvider
SPI.
-
Method Details
-
registerExecutorBindings
Create qualifiedExecutorService
andScheduledExecutorService
injection bindings based on the registered providers implementing theExecutorServiceProvider
and/orScheduledExecutorServiceProvider
SPI.This method supports creation of qualified injection bindings based on custom
qualifier annotations
attached to the registered provider implementation classes as well as named injection bindings based on theNamed
qualifier annotation attached to the registered provider implementation classes.ExecutorServiceProvider
andScheduledExecutorServiceProvider
will be retrieved fromInjectionManager
.- Parameters:
injectionManager
- application's injection manager.
-
registerExecutorBindings
public static void registerExecutorBindings(InjectionManager injectionManager, List<ExecutorServiceProvider> executorProviders, List<ScheduledExecutorServiceProvider> scheduledProviders) Create qualifiedExecutorService
andScheduledExecutorService
injection bindings based on the registered providers implementing theExecutorServiceProvider
and/orScheduledExecutorServiceProvider
SPI.This method supports creation of qualified injection bindings based on custom
qualifier annotations
attached to the registered provider implementation classes as well as named injection bindings based on theNamed
qualifier annotation attached to the registered provider implementation classes.- Parameters:
injectionManager
- injection manager to register newly created executor bindings.executorProviders
- all executor providers registered internally in Jersey and in configuration.scheduledProviders
- all scheduled executor providers registered internally in Jersey and in configuration.
-