Class ContextHandler (3.20.3)

public class ContextHandler

Class provides a per-thread storage of the {@see Context} instances.

Inheritance

java.lang.Object > ContextHandler

Constructors

ContextHandler()

public ContextHandler()

Methods

getCurrentContext()

public Context getCurrentContext()
Returns
Type Description
Context

getCurrentContextPriority()

public ContextHandler.ContextPriority getCurrentContextPriority()
Returns
Type Description
ContextHandler.ContextPriority

removeCurrentContext()

public void removeCurrentContext()

removeCurrentContextPriority()

public void removeCurrentContextPriority()

setCurrentContext(Context context)

public void setCurrentContext(Context context)
Parameter
Name Description
context Context

setCurrentContext(Context context, ContextHandler.ContextPriority priority)

public void setCurrentContext(Context context, ContextHandler.ContextPriority priority)

Sets the context based on the priority. Overrides traceId, spanId and TraceSampled if the passed priority is higher. HttpRequest values will be retrieved and combined from existing context if HttpRequest in the new context is empty .

Parameters
Name Description
context Context
priority ContextHandler.ContextPriority