Class ContextualThreadFactory<C>
java.lang.Object
org.wildfly.clustering.context.ContextualThreadFactory<C>
- Type Parameters:
C- the context type
- All Implemented Interfaces:
ThreadFactory
- Direct Known Subclasses:
DefaultThreadFactory
ThreadFactory decorator that contextualizes its threads.- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionContextualThreadFactory(ThreadFactory factory, C targetContext, ContextReference<C> contextReference) Constructs a contextual thread factory. -
Method Summary
-
Constructor Details
-
ContextualThreadFactory
public ContextualThreadFactory(ThreadFactory factory, C targetContext, ContextReference<C> contextReference) Constructs a contextual thread factory.- Parameters:
factory- the decorated thread factorytargetContext- the context with which new thread tasks should run.contextReference- the context reference used by this thread factory
-
-
Method Details
-
newThread
- Specified by:
newThreadin interfaceThreadFactory
-