public class Contextualizer extends Object
Contextualizer is able to wrap operation so that it can be run in another thread with given contexts activated.| Constructor and Description |
|---|
Contextualizer() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
contextualize(OperationalContextRetriver retriver,
T instance,
Class<?> interfaze,
Class<?>... contextPropagatingInterfaces)
Contextualizes operation with contexts given by
OperationalContext which is given by provided
OperationalContextRetriver |
static <T> T |
contextualize(OperationalContext context,
T instance,
Class<?> interfaze,
Class<?>... contextPropagatingInterfaces)
Contextualizes operation with contexts given by
OperationalContext |
public static <T> T contextualize(OperationalContext context, T instance, Class<?> interfaze, Class<?>... contextPropagatingInterfaces)
OperationalContextretriever - the contextinstance - the instance to wrap (must comply with given interface)interfaze - the interface of return objectcontextPropagatingInterfaces - when a return type of any invocation is one of these interfaces, the given result will be call contextually as wellpublic static <T> T contextualize(OperationalContextRetriver retriver, T instance, Class<?> interfaze, Class<?>... contextPropagatingInterfaces)
OperationalContext which is given by provided
OperationalContextRetriverretriever - the context retrieverinstance - the instance to wrap (must comply with given interface)interfaze - the interface of return objectcontextPropagatingInterfaces - when a return type of any invocation is one of these interfaces, the given result will be call contextually as wellCopyright © 2019 JBoss by Red Hat. All rights reserved.