org.eclipse.microprofile.context.tck.contexts.priority.spi

## Class ThreadPriorityContextProvider

- java.lang.Object
- - org.eclipse.microprofile.context.tck.contexts.priority.spi.ThreadPriorityContextProvider

All Implemented Interfaces:
  ThreadContextProvider

    public class ThreadPriorityContextProvider
    extends Object
    implements 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
`static String` `THREAD_PRIORITY`

### Constructor Summary

Constructors
Constructor and Description
`ThreadPriorityContextProvider()`

### Method Summary

All Methods Instance Methods Concrete Methods
`ThreadContextSnapshot` `clearedContext(Map<String,String> props)` Thread priority context is considered cleared by resetting to normal priority (Thread.NORM_PRIORITY).
`ThreadContextSnapshot` `currentContext(Map<String,String> props)` Save the current thread priority.
`String` `getThreadContextType()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### THREAD_PRIORITY

    public static final String THREAD_PRIORITY

See Also:
  Constant Field Values

### Constructor Detail

#### ThreadPriorityContextProvider

    public ThreadPriorityContextProvider()

### Method Detail

#### clearedContext

    public ThreadContextSnapshot clearedContext(Map<String,String> props)

Thread priority context is considered cleared by resetting to normal priority (Thread.NORM_PRIORITY).

Specified by:
  `clearedContext` in interface `ThreadContextProvider`

#### currentContext

    public ThreadContextSnapshot currentContext(Map<String,String> props)

Save the current thread priority.

Specified by:
  `currentContext` in interface `ThreadContextProvider`

#### getThreadContextType

    public String getThreadContextType()

Specified by:
  `getThreadContextType` in interface `ThreadContextProvider`