Class CurrentRequestContextForwardingExecutorService
- java.lang.Object
-
- com.google.common.collect.ForwardingObject
-
- com.google.common.util.concurrent.ForwardingExecutorService
-
- com.google.common.util.concurrent.ForwardingListeningExecutorService
-
- org.curioswitch.common.server.framework.armeria.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
AExecutor
that will run tasks on a delegate, making callbacks context-aware when aRequestContext
is available.
-
-
Constructor Summary
Constructors Constructor Description CurrentRequestContextForwardingExecutorService(java.util.concurrent.ExecutorService delegate)
-
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
execute
public void execute(java.lang.Runnable command)
- Specified by:
execute
in interfacejava.util.concurrent.Executor
- Overrides:
execute
in classcom.google.common.util.concurrent.ForwardingExecutorService
-
delegate
protected com.google.common.util.concurrent.ListeningExecutorService delegate()
- Specified by:
delegate
in classcom.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 interfacejava.util.concurrent.ExecutorService
- Specified by:
submit
in interfacecom.google.common.util.concurrent.ListeningExecutorService
- Overrides:
submit
in classcom.google.common.util.concurrent.ForwardingListeningExecutorService
-
submit
public com.google.common.util.concurrent.ListenableFuture<?> submit(java.lang.Runnable task)
- Specified by:
submit
in interfacejava.util.concurrent.ExecutorService
- Specified by:
submit
in interfacecom.google.common.util.concurrent.ListeningExecutorService
- Overrides:
submit
in classcom.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 interfacejava.util.concurrent.ExecutorService
- Specified by:
submit
in interfacecom.google.common.util.concurrent.ListeningExecutorService
- Overrides:
submit
in classcom.google.common.util.concurrent.ForwardingListeningExecutorService
-
-