@Contract public interface RequestExecutorProvider
executor service instance used to run
different parts of Jersey request and response processing code.
During Jersey runtime initialization, Jersey invokes the registered executor provider
to get the requesting executor that will be used
to run the request pre-processing and request-to-response transformation code.
The custom provider implementing this interface should be registered in the standard way on the server. The client must be created with configuration containing the provider, later registrations will be ignored.
| Modifier and Type | Method and Description |
|---|---|
ExecutorService |
getRequestingExecutor()
Get request processing executor.
|
void |
releaseRequestingExecutor(ExecutorService executor)
Release the executor previously retrieved via
getRequestingExecutor() call. |
ExecutorService getRequestingExecutor()
null.void releaseRequestingExecutor(ExecutorService executor)
getRequestingExecutor() call.
This method is called when the Jersey runtime does not need the executor anymore.
After this method has been called, the executor will not be used by the Jersey runtime
anymore.
The decision how the executor is released is left upon the provider implementation. In most typical scenarios, the executor may be simply shutdown. However in cases when the provider is implemented to re-use same executors across multiple components or Jersey runtimes, the executor release logic may require more sophisticated implementation.
executor - executor instance to be released.Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.