public interface Foreground
Modifier and Type | Method and Description |
---|---|
ReadOnlyContext |
getContext()
Provides the current context on the current thread.
|
com.google.common.util.concurrent.ListeningScheduledExecutorService |
getExecutor()
The executor that manages foreground work.
|
ReadOnlyContext getContext() throws NoBoundContextException
This method is primarily provided for integration with dependency injection frameworks.
NoBoundContextException
- if this method is called from a thread that is not performing request processingcom.google.common.util.concurrent.ListeningScheduledExecutorService getExecutor()
Can be used for scheduling or performing computation. This is the same executor that is managing request handling threads. Blocking operations should not be performed by tasks of this executor.