One is to assemble a processing chain that consists of a target WebHandler,
then decorated with a set of WebFilters, then further decorated with
a set of WebExceptionHandlers.
The second purpose is to adapt the resulting processing chain to an HttpHandler:
the lowest-level reactive HTTP handling abstraction which can then be used with any of the
supported runtimes. The adaptation is done with the help of HttpWebHandlerAdapter.
The processing chain can be assembled manually via builder methods, or detected from
a Spring ApplicationContext via applicationContext, or a mix of both.
HttpWebHandlerAdapter
| Modifier and Type | Class and Description |
|---|---|
| public static class | WebHttpHandlerBuilder.
|
| Modifier and Type | Field and Description |
|---|---|
| private final ApplicationContext | |
| private ServerCodecConfigurer | |
| private final List | |
| private final List | |
| public static final String | FORWARDED_HEADER_TRANSFORMER_BEAN_NAME
Well-known name for the ForwardedHeaderTransformer in the bean factory. |
| private ForwardedHeaderTransformer | |
| private Function | |
| public static final String | LOCALE_CONTEXT_RESOLVER_BEAN_NAME
Well-known name for the LocaleContextResolver in the bean factory. |
| private LocaleContextResolver | |
| private ServerRequestObservationConvention | |
| private ObservationRegistry | |
| public static final String | SERVER_CODEC_CONFIGURER_BEAN_NAME
Well-known name for the ServerCodecConfigurer in the bean factory. |
| private WebSessionManager | |
| public static final String | WEB_HANDLER_BEAN_NAME
Well-known name for the target WebHandler in the bean factory. |
| public static final String | WEB_SESSION_MANAGER_BEAN_NAME
Well-known name for the WebSessionManager in the bean factory. |
| private final WebHandler |
| Access | Constructor and Description |
|---|---|
| private | WebHttpHandlerBuilder(WebHandler webHandler, ApplicationContext applicationContext)
Private constructor to use when initialized from an ApplicationContext. |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static WebHttpHandlerBuilder | Returns: the prepared builderthe application context to use for the lookup context)Static factory method to create a new builder instance by detecting beans
in an |
| public HttpHandler | |
| public WebHttpHandlerBuilder | Returns: the cloned builder instanceOverrides java. Clone this |
| public WebHttpHandlerBuilder | codecConfigurer(ServerCodecConfigurer
the codec configurer codecConfigurer)Configure the |
| public WebHttpHandlerBuilder | exceptionHandler(WebExceptionHandler...
the exception handler(s) handlers)Add the given exception handler(s). |
| public WebHttpHandlerBuilder | exceptionHandlers(Consumer<List<WebExceptionHandler>>
the consumer to use consumer)Manipulate the "live" list of currently configured exception handlers. |
| public WebHttpHandlerBuilder | |
| public WebHttpHandlerBuilder | |
| public WebHttpHandlerBuilder | forwardedHeaderTransformer(ForwardedHeaderTransformer
the transformer transformer)Configure the |
| public boolean | hasCodecConfigurer()
Whether a |
| public boolean | hasForwardedHeaderTransformer()
Whether a |
| public boolean | hasHttpHandlerDecorator()
Whether a decorator for |
| public boolean | hasLocaleContextResolver()
Whether a |
| public boolean | hasSessionManager()
Whether a |
| public WebHttpHandlerBuilder | httpHandlerDecorator(Function<HttpHandler, HttpHandler>
the decorator to apply handlerDecorator)Configure a |
| public WebHttpHandlerBuilder | localeContextResolver(LocaleContextResolver
the locale context resolver localeContextResolver)Configure the |
| public WebHttpHandlerBuilder | observationConvention(ServerRequestObservationConvention
the convention to use for all recorded observations observationConvention)Configure a |
| public WebHttpHandlerBuilder | observationRegistry(ObservationRegistry
the observation registry observationRegistry)Configure an |
| public WebHttpHandlerBuilder | sessionManager(WebSessionManager
the session manager manager)Configure the |
| private void | |
| public static WebHttpHandlerBuilder | Returns: the prepared builderthe target handler for the request webHandler)Static factory method to create a new builder instance. |
| applicationContext | back to summary |
|---|---|
| private final ApplicationContext applicationContext
| |
| codecConfigurer | back to summary |
|---|---|
| private ServerCodecConfigurer codecConfigurer
| |
| exceptionHandlers | back to summary |
|---|---|
| private final List<WebExceptionHandler> exceptionHandlers | |
| filters | back to summary |
|---|---|
| private final List<WebFilter> filters | |
| FORWARDED_HEADER_TRANSFORMER_BEAN_NAME | back to summary |
|---|---|
| public static final String FORWARDED_HEADER_TRANSFORMER_BEAN_NAME Well-known name for the ForwardedHeaderTransformer in the bean factory. | |
| forwardedHeaderTransformer | back to summary |
|---|---|
| private ForwardedHeaderTransformer forwardedHeaderTransformer
| |
| httpHandlerDecorator | back to summary |
|---|---|
| private Function<HttpHandler, HttpHandler> httpHandlerDecorator
| |
| LOCALE_CONTEXT_RESOLVER_BEAN_NAME | back to summary |
|---|---|
| public static final String LOCALE_CONTEXT_RESOLVER_BEAN_NAME Well-known name for the LocaleContextResolver in the bean factory. | |
| localeContextResolver | back to summary |
|---|---|
| private LocaleContextResolver localeContextResolver
| |
| observationConvention | back to summary |
|---|---|
| private ServerRequestObservationConvention observationConvention
| |
| observationRegistry | back to summary |
|---|---|
| private ObservationRegistry observationRegistry
| |
| SERVER_CODEC_CONFIGURER_BEAN_NAME | back to summary |
|---|---|
| public static final String SERVER_CODEC_CONFIGURER_BEAN_NAME Well-known name for the ServerCodecConfigurer in the bean factory. | |
| sessionManager | back to summary |
|---|---|
| private WebSessionManager sessionManager
| |
| WEB_HANDLER_BEAN_NAME | back to summary |
|---|---|
| public static final String WEB_HANDLER_BEAN_NAME Well-known name for the target WebHandler in the bean factory. | |
| WEB_SESSION_MANAGER_BEAN_NAME | back to summary |
|---|---|
| public static final String WEB_SESSION_MANAGER_BEAN_NAME Well-known name for the WebSessionManager in the bean factory. | |
| webHandler | back to summary |
|---|---|
| private final WebHandler webHandler | |
| WebHttpHandlerBuilder | back to summary |
|---|---|
| private WebHttpHandlerBuilder(WebHandler webHandler, ApplicationContext applicationContext) Private constructor to use when initialized from an ApplicationContext. | |
| WebHttpHandlerBuilder | back to summary |
|---|---|
| private WebHttpHandlerBuilder(WebHttpHandlerBuilder other) Copy constructor. | |
| applicationContext | back to summary |
|---|---|
| public static WebHttpHandlerBuilder applicationContext(ApplicationContext context) Static factory method to create a new builder instance by detecting beans
in an
| |
| build | back to summary |
|---|---|
| public HttpHandler build() Build the | |
| clone | back to summary |
|---|---|
| public WebHttpHandlerBuilder clone() Overrides java. Clone this
| |
| codecConfigurer | back to summary |
|---|---|
| public WebHttpHandlerBuilder codecConfigurer(ServerCodecConfigurer codecConfigurer) Configure the
| |
| exceptionHandler | back to summary |
|---|---|
| public WebHttpHandlerBuilder exceptionHandler(WebExceptionHandler... handlers) Add the given exception handler(s).
| |
| exceptionHandlers | back to summary |
|---|---|
| public WebHttpHandlerBuilder exceptionHandlers(Consumer<List<WebExceptionHandler>> consumer) Manipulate the "live" list of currently configured exception handlers.
| |
| filter | back to summary |
|---|---|
| public WebHttpHandlerBuilder filter(WebFilter... filters) Add the given filter(s).
| |
| filters | back to summary |
|---|---|
| public WebHttpHandlerBuilder filters(Consumer<List<WebFilter>> consumer) Manipulate the "live" list of currently configured filters. | |
| forwardedHeaderTransformer | back to summary |
|---|---|
| public WebHttpHandlerBuilder forwardedHeaderTransformer(ForwardedHeaderTransformer transformer) Configure the
| |
| hasCodecConfigurer | back to summary |
|---|---|
| public boolean hasCodecConfigurer() Whether a
| |
| hasForwardedHeaderTransformer | back to summary |
|---|---|
| public boolean hasForwardedHeaderTransformer() Whether a
| |
| hasHttpHandlerDecorator | back to summary |
|---|---|
| public boolean hasHttpHandlerDecorator() Whether a decorator for
| |
| hasLocaleContextResolver | back to summary |
|---|---|
| public boolean hasLocaleContextResolver() Whether a
| |
| hasSessionManager | back to summary |
|---|---|
| public boolean hasSessionManager() Whether a
| |
| httpHandlerDecorator | back to summary |
|---|---|
| public WebHttpHandlerBuilder httpHandlerDecorator(Function<HttpHandler, HttpHandler> handlerDecorator) Configure a
| |
| localeContextResolver | back to summary |
|---|---|
| public WebHttpHandlerBuilder localeContextResolver(LocaleContextResolver localeContextResolver) Configure the
| |
| observationConvention | back to summary |
|---|---|
| public WebHttpHandlerBuilder observationConvention(ServerRequestObservationConvention observationConvention) Configure a
| |
| observationRegistry | back to summary |
|---|---|
| public WebHttpHandlerBuilder observationRegistry(ObservationRegistry observationRegistry) Configure an
| |
| sessionManager | back to summary |
|---|---|
| public WebHttpHandlerBuilder sessionManager(WebSessionManager manager) Configure the By default
| |
| updateFilters | back to summary |
|---|---|
| private void updateFilters() | |
| webHandler | back to summary |
|---|---|
| public static WebHttpHandlerBuilder webHandler(WebHandler webHandler) Static factory method to create a new builder instance.
| |
BlockHoundIntegration for spring-web classes.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | applyTo(BlockHound.
an instance of builderBlockHound. that is being installedImplements reactor. Lets an integration apply the customizations (see |
| SpringWebBlockHoundIntegration | back to summary |
|---|---|
| public SpringWebBlockHoundIntegration() | |
| applyTo | back to summary |
|---|---|
| public void applyTo(BlockHound. Implements reactor. Doc from reactor. Lets an integration apply the customizations (see
| |