Class SimpleExecutionContext
java.lang.Object
ch.tocco.nice2.boot.api.executioncontext.SimpleExecutionContext
- All Implemented Interfaces:
ExecutionContext
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.boot.api.executioncontext.ExecutionContext
ExecutionContext.Current
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
getContext
(Class<T> ctxClass) Returns the execution context for the given class, ornull
.<T> T
getContext
(Class<T> ctxClass, ContextFactory<T> factory) Returns the execution context for the given class, creates a new one using the factory if it's not in the execution context yet and puts it in.boolean
isEmpty()
<T> T
removeContext
(Class<T> ctxClass) <T> T
requireContext
(Class<T> ctxClass) <T> T
setContext
(ContextWrapper<T> wrapper) <T> T
setContext
(Class<T> ctxClass, T ctx)
-
Constructor Details
-
SimpleExecutionContext
public SimpleExecutionContext() -
SimpleExecutionContext
-
-
Method Details
-
getContext
Description copied from interface:ExecutionContext
Returns the execution context for the given class, ornull
.- Specified by:
getContext
in interfaceExecutionContext
-
getContext
Description copied from interface:ExecutionContext
Returns the execution context for the given class, creates a new one using the factory if it's not in the execution context yet and puts it in.- Specified by:
getContext
in interfaceExecutionContext
-
requireContext
- Specified by:
requireContext
in interfaceExecutionContext
-
setContext
- Specified by:
setContext
in interfaceExecutionContext
-
setContext
- Specified by:
setContext
in interfaceExecutionContext
-
removeContext
- Specified by:
removeContext
in interfaceExecutionContext
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceExecutionContext
-