Package ch.tocco.nice2.netui.api.remote
Class RemoteContext.Current
java.lang.Object
ch.tocco.nice2.netui.api.remote.RemoteContext.Current
- Enclosing interface:
RemoteContext
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<RemoteContext> get()Get the context for the current thread.static voidremove()Remove the context for the current thread.static voidset(RemoteContext remoteContext) Set the context for the current thread.static Invokerwith(@Nullable RemoteContext remoteContext) Get an invoker for the given context.
-
Method Details
-
get
Get the context for the current thread.- Returns:
- The context for the current thread.
-
set
Set the context for the current thread. -
remove
public static void remove()Remove the context for the current thread. -
with
Get an invoker for the given context.- Parameters:
remoteContext- The desired context.- Returns:
- the invoker.
-