Class CurrentRequestContextForwardingExecutorService

  • All Implemented Interfaces:
    com.google.common.util.concurrent.ListeningExecutorService, java.util.concurrent.Executor, java.util.concurrent.ExecutorService

    public class CurrentRequestContextForwardingExecutorService
    extends com.google.common.util.concurrent.ForwardingListeningExecutorService
    A Executor that will run tasks on a delegate, making callbacks context-aware when a RequestContext is available.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected com.google.common.util.concurrent.ListeningExecutorService delegate()  
      void execute​(java.lang.Runnable command)  
      com.google.common.util.concurrent.ListenableFuture<?> submit​(java.lang.Runnable task)  
      <T> com.google.common.util.concurrent.ListenableFuture<T> submit​(java.lang.Runnable task, T result)  
      <T> com.google.common.util.concurrent.ListenableFuture<T> submit​(java.util.concurrent.Callable<T> task)  
      • Methods inherited from class com.google.common.util.concurrent.ForwardingExecutorService

        awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow
      • Methods inherited from class com.google.common.collect.ForwardingObject

        toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.concurrent.ExecutorService

        awaitTermination, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow
      • Methods inherited from interface com.google.common.util.concurrent.ListeningExecutorService

        invokeAll, invokeAll
    • Constructor Detail

      • CurrentRequestContextForwardingExecutorService

        public CurrentRequestContextForwardingExecutorService​(java.util.concurrent.ExecutorService delegate)
    • Method Detail

      • execute

        public void execute​(java.lang.Runnable command)
        Specified by:
        execute in interface java.util.concurrent.Executor
        Overrides:
        execute in class com.google.common.util.concurrent.ForwardingExecutorService
      • delegate

        protected com.google.common.util.concurrent.ListeningExecutorService delegate()
        Specified by:
        delegate in class com.google.common.util.concurrent.ForwardingListeningExecutorService
      • submit

        public <T> com.google.common.util.concurrent.ListenableFuture<T> submit​(java.util.concurrent.Callable<T> task)
        Specified by:
        submit in interface java.util.concurrent.ExecutorService
        Specified by:
        submit in interface com.google.common.util.concurrent.ListeningExecutorService
        Overrides:
        submit in class com.google.common.util.concurrent.ForwardingListeningExecutorService
      • submit

        public com.google.common.util.concurrent.ListenableFuture<?> submit​(java.lang.Runnable task)
        Specified by:
        submit in interface java.util.concurrent.ExecutorService
        Specified by:
        submit in interface com.google.common.util.concurrent.ListeningExecutorService
        Overrides:
        submit in class com.google.common.util.concurrent.ForwardingListeningExecutorService
      • submit

        public <T> com.google.common.util.concurrent.ListenableFuture<T> submit​(java.lang.Runnable task,
                                                                                T result)
        Specified by:
        submit in interface java.util.concurrent.ExecutorService
        Specified by:
        submit in interface com.google.common.util.concurrent.ListeningExecutorService
        Overrides:
        submit in class com.google.common.util.concurrent.ForwardingListeningExecutorService