Class ThreadPriorityContextProvider
java.lang.Object
org.eclipse.microprofile.context.tck.contexts.priority.spi.ThreadPriorityContextProvider
- All Implemented Interfaces:
ThreadContextProvider
This is an example context type that is created by the test suite.
This context type captures/clears/propagates/restores thread priority (java.lang.Thread.get/setPriority).
This is chosen, not because it is useful in any way, but because the concept of thread priority is simple,
well understood, and already built into Java.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclearedContext(Map<String, String> props) Thread priority context is considered cleared by resetting to normal priority (Thread.NORM_PRIORITY).currentContext(Map<String, String> props) Save the current thread priority.
-
Field Details
-
THREAD_PRIORITY
- See Also:
-
-
Constructor Details
-
ThreadPriorityContextProvider
public ThreadPriorityContextProvider()
-
-
Method Details
-
clearedContext
Thread priority context is considered cleared by resetting to normal priority (Thread.NORM_PRIORITY).- Specified by:
clearedContextin interfaceThreadContextProvider
-
currentContext
Save the current thread priority.- Specified by:
currentContextin interfaceThreadContextProvider
-
getThreadContextType
- Specified by:
getThreadContextTypein interfaceThreadContextProvider
-