C - "context" type stored in the ThreadLocal.public abstract class ThreadLocalRequestScopePropagator<C> extends RequestScopePropagator
RequestScopePropagator implementation for request scopes based on a ThreadLocal
context.| Modifier | Constructor and Description |
|---|---|
protected |
ThreadLocalRequestScopePropagator(com.google.inject.Scope scope,
ThreadLocal<C> threadLocal,
ThreadLocalRequestContext local,
com.google.inject.Provider<RequestScopedReviewDbProvider> dbProviderProvider) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract C |
continuingContext(C ctx)
Returns a new context object based on the passed in context that has no request scoped objects
initialized.
|
protected <T> Callable<T> |
wrapImpl(Callable<T> callable) |
cleanup, context, wrap, wrapprotected ThreadLocalRequestScopePropagator(com.google.inject.Scope scope,
ThreadLocal<C> threadLocal,
ThreadLocalRequestContext local,
com.google.inject.Provider<RequestScopedReviewDbProvider> dbProviderProvider)
protected final <T> Callable<T> wrapImpl(Callable<T> callable)
wrapImpl in class RequestScopePropagatorRequestScopePropagator.wrap(Callable)protected abstract C continuingContext(C ctx)
Note that some code paths expect request-scoped objects like CurrentUser to be
constructible starting from just the context object returned by this method. For example, in
the SSH scope, the context includes the SshSession, which is used by SshCurrentUserProvider to construct a new CurrentUser in the new thread.
ctx - the context to continue.