public interface ContextCapturer
ContextsContainer objects between threads. This is specifically useful to pass these
objects between an inbound and outbound channel during request processing. ContextsContainer objects is attached to a channel, via Attribute, it is recommended to
pick it up from there instead of worrying about the threads on which it is put. | Modifier and Type | Method and Description |
|---|---|
<V> java.util.concurrent.Callable<V> |
makeClosure(java.util.concurrent.Callable<V> original)
Encloses the passed
Callable into a closure so that it can capture the contexts as it exists when this
Callable is created and use it during the context's execution, which happens in a different thread. |
java.lang.Runnable |
makeClosure(java.lang.Runnable original)
Encloses the passed
Runnable into a closure so that it can capture the contexts as it exists when this
Runnable is created and use it during the context's execution, which happens in a different thread. |
<V> java.util.concurrent.Callable<V> makeClosure(java.util.concurrent.Callable<V> original)
Callable into a closure so that it can capture the contexts as it exists when this
Callable is created and use it during the context's execution, which happens in a different thread.V - Return type of the Callableoriginal - Original Callable to be invoked from the closure.Callablejava.lang.Runnable makeClosure(java.lang.Runnable original)
Runnable into a closure so that it can capture the contexts as it exists when this
Runnable is created and use it during the context's execution, which happens in a different thread.original - Original Runnable to be invoked from the closure.Runnable