Class ContextPropagationFilter
- java.lang.Object
-
- io.helidon.webserver.context.propagation.ContextPropagationFilter
-
- All Implemented Interfaces:
Handler
,BiConsumer<ServerRequest,ServerResponse>
public class ContextPropagationFilter extends Object implements Handler
Filter to add propagation of context values through HTTP headers. This filter will read headers from the request and inject the values into the requestContext
. Note that the values are stored in the context exactly as obtained from request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ContextPropagationFilter.Builder
Fluent API builder forContextPropagationFilter
.-
Nested classes/interfaces inherited from interface io.helidon.webserver.Handler
Handler.EntityHandler<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(ServerRequest req, ServerResponse res)
static ContextPropagationFilter.Builder
builder()
A new fluent API builder to customize configuration of context propagation.static ContextPropagationFilter
create(Config config)
Create a filter from configuration.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.function.BiConsumer
andThen
-
-
-
-
Method Detail
-
builder
public static ContextPropagationFilter.Builder builder()
A new fluent API builder to customize configuration of context propagation.- Returns:
- a new builder
-
create
public static ContextPropagationFilter create(Config config)
Create a filter from configuration.- Parameters:
config
- configuration to read, must be located on node of server context propagation- Returns:
- a new context propagation filter
-
accept
public void accept(ServerRequest req, ServerResponse res)
Description copied from interface:Handler
- Specified by:
accept
in interfaceBiConsumer<ServerRequest,ServerResponse>
- Specified by:
accept
in interfaceHandler
- Parameters:
req
- an HTTP server request.res
- an HTTP server response.
-
-