Class RequestExecutorProvider.WorkerThreadProvider

  • All Implemented Interfaces:
    RequestExecutorProvider
    Enclosing interface:
    RequestExecutorProvider

    public static class RequestExecutorProvider.WorkerThreadProvider
    extends java.lang.Object
    implements RequestExecutorProvider
    The RequestExecutorProvider implementation, which checks if the current Thread is a service Thread (see Threads.isService()). If the current Thread is a service Thread - the implementation returns a worker thread pool associated with the Request, or, if the current Thread is not a service Thread - null will be return to force the user code to be executed on the current Thread.
    • Constructor Detail

      • WorkerThreadProvider

        public WorkerThreadProvider()
    • Method Detail

      • getExecutor

        public java.util.concurrent.Executor getExecutor​(Request request)
        Description copied from interface: RequestExecutorProvider
        Returns the Executor to execute user's code associated with the Request processing.
        Specified by:
        getExecutor in interface RequestExecutorProvider
        Parameters:
        request - Request
        Returns:
        the Executor to execute user's code associated with the Request processing, or null if the Request has to be executed on the current Thread