public final class ThreadContextAccessor extends Object
ThreadContext
.Modifier and Type | Method and Description |
---|---|
static ThreadContext |
getCurrentContext() |
static ThreadContextFacade |
getThreadContextFacade()
Returns the
ThreadContextFacade instance. |
static void |
setThreadContextFacade(ThreadContextFacade threadContextFacade)
Replaces the default
ThreadContextFacade instance. |
static io.vavr.control.Try<ThreadContext> |
tryGetCurrentContext()
Returns a
Try of the current ThreadContext . |
static io.vavr.control.Try<ThreadContextFacade> |
tryGetThreadContextFacade()
Returns a
Try of the ThreadContextFacade instance. |
@Nullable public static ThreadContextFacade getThreadContextFacade()
ThreadContextFacade
instance.ThreadContextFacade
instance, or null
.@Nonnull public static io.vavr.control.Try<ThreadContextFacade> tryGetThreadContextFacade()
Try
of the ThreadContextFacade
instance.Try
of the ThreadContextFacade
instance.public static void setThreadContextFacade(@Nullable ThreadContextFacade threadContextFacade)
ThreadContextFacade
instance.threadContextFacade
- An instance of ThreadContextFacade
. Use null
to reset the facade.@Nonnull public static ThreadContext getCurrentContext() throws ThreadContextAccessException
ThreadContextAccessException
@Nonnull public static io.vavr.control.Try<ThreadContext> tryGetCurrentContext()
Try
of the current ThreadContext
.Try
of the current ThreadContext
.Copyright © 2019 SAP SE. All rights reserved.