@Contract public interface RuntimeThreadProvider
This mechanism allows Jersey to run in environments that have specific thread management and
provisioning requirements, such as application servers etc. Dedicated Jersey extension modules
or applications running in such environment may provide a custom implementation of the
RuntimeThreadProvider interface to customize the Jersey runtime thread management
& provisioning strategy to comply with the threading requirements, models and policies
specific to each particular environment.
Note that only a single thread factory provider can be registered in each application.
| Modifier and Type | Method and Description |
|---|---|
ThreadFactory |
getBackgroundThreadFactory()
Get a
ThreadFactory that will create threads that will be used for running background
tasks, independently of current request scope. |
ThreadFactory |
getRequestThreadFactory()
Get a
ThreadFactory that will be used to create threads scoped to the current request. |
ThreadFactory getRequestThreadFactory()
ThreadFactory that will be used to create threads scoped to the current request.
The method is not used by Jersey runtime at the moment but may be required in the future.
ThreadFactory getBackgroundThreadFactory()
ThreadFactory that will create threads that will be used for running background
tasks, independently of current request scope.Copyright © 2007-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.