userver: server::middlewares::HandlerPipelineBuilder Class Reference
Loading...
Searching...
No Matches
server::middlewares::HandlerPipelineBuilder Class Reference

#include <userver/server/middlewares/configuration.hpp>

Detailed Description

Base class to build a per-handler middleware pipeline. One may inherit from it and implement any custom logic, if desired. By default the behavior is to use the server-wide pipeline.

Definition at line 90 of file configuration.hpp.

+ Inheritance diagram for server::middlewares::HandlerPipelineBuilder:
+ Collaboration diagram for server::middlewares::HandlerPipelineBuilder:

Public Member Functions

 HandlerPipelineBuilder (const components::ComponentConfig &, const components::ComponentContext &)
 
virtual MiddlewaresList BuildPipeline (MiddlewaresList server_middleware_pipeline) const
 The method to configure build a per-handler middleware pipeline, one may override it if custom behavior is desired.
 
- Public Member Functions inherited from components::LoggableComponentBase
 LoggableComponentBase (const ComponentConfig &, const ComponentContext &)
 
 LoggableComponentBase (LoggableComponentBase &&)=delete
 
 LoggableComponentBase (const LoggableComponentBase &)=delete
 
 ~LoggableComponentBase () override=default
 
ComponentHealth GetComponentHealth () const override
 
void OnLoadingCancelled () override
 
void OnAllComponentsLoaded () override
 
void OnAllComponentsAreStopping () override
 

Static Public Attributes

static constexpr std::string_view kName
 

Additional Inherited Members

- Static Public Member Functions inherited from components::LoggableComponentBase
static yaml_config::Schema GetStaticConfigSchema ()
 

Member Function Documentation

◆ BuildPipeline()

virtual MiddlewaresList server::middlewares::HandlerPipelineBuilder::BuildPipeline ( MiddlewaresList server_middleware_pipeline) const
inlinevirtual

The method to configure build a per-handler middleware pipeline, one may override it if custom behavior is desired.

For example, a ping/ handler doesn't necessary need any business-logic related functionality, and could use just DefaultPipeline() for itself.

Parameters
server_middleware_pipelinethe server-wide middleware pipeline

Definition at line 105 of file configuration.hpp.

Member Data Documentation

◆ kName

constexpr std::string_view server::middlewares::HandlerPipelineBuilder::kName
staticconstexpr
Initial value:
{
"default-handler-middleware-pipeline-builder"}

Definition at line 92 of file configuration.hpp.


The documentation for this class was generated from the following file: