Class ServerWebExchangeThreadLocalAccessor
java.lang.Object
org.springframework.security.web.server.ServerWebExchangeThreadLocalAccessor
- All Implemented Interfaces:
io.micrometer.context.ThreadLocalAccessor<org.springframework.web.server.ServerWebExchange>
public final class ServerWebExchangeThreadLocalAccessor
extends Object
implements io.micrometer.context.ThreadLocalAccessor<org.springframework.web.server.ServerWebExchange>
A
ThreadLocalAccessor
for accessing a ServerWebExchange
.
This class adapts the existing Reactor Context attribute
ServerWebExchange.class
to the ThreadLocalAccessor
contract to allow
Micrometer Context Propagation to automatically propagate a ServerWebExchange
in Reactive applications. It is automatically registered with the
ContextRegistry
through the
ServiceLoader
mechanism when context-propagation is on the classpath.
- Since:
- 6.5
- See Also:
-
ContextRegistry
-
Constructor Details
-
ServerWebExchangeThreadLocalAccessor
public ServerWebExchangeThreadLocalAccessor()
-
-
Method Details
-
key
- Specified by:
key
in interfaceio.micrometer.context.ThreadLocalAccessor<org.springframework.web.server.ServerWebExchange>
-
getValue
public org.springframework.web.server.ServerWebExchange getValue()- Specified by:
getValue
in interfaceio.micrometer.context.ThreadLocalAccessor<org.springframework.web.server.ServerWebExchange>
-
setValue
public void setValue(org.springframework.web.server.ServerWebExchange exchange) - Specified by:
setValue
in interfaceio.micrometer.context.ThreadLocalAccessor<org.springframework.web.server.ServerWebExchange>
-
setValue
public void setValue()- Specified by:
setValue
in interfaceio.micrometer.context.ThreadLocalAccessor<org.springframework.web.server.ServerWebExchange>
-