9 #include <restinio/request_handler.hpp> 76 class async_handling_controller_t;
144 template<
typename Extra_Data_Factory >
145 class async_handling_controller_t
148 template<
typename Extra_Data_Factory_For_Next >
150 next( unique_async_handling_controller_t< Extra_Data_Factory_For_Next > controller );
154 using actual_request_handle_t =
155 generic_request_handle_t<
typename Extra_Data_Factory::data_t >;
158 using actual_async_request_scheduler_t =
159 generic_async_request_scheduler_t<
typename Extra_Data_Factory::data_t >;
162 using actual_on_next_result_t =
163 on_next_result_t< Extra_Data_Factory >;
218 template<
typename Request_Handle >
235 template<
typename Request_Handle >
253 template<
typename Extra_Data_Factory >
260 const generic_async_request_scheduler_t< Extra_Data_Factory > & handler )
const Helper type to be used as handler of variant values in std::visit.
virtual const actual_request_handle_t & request_handle() const noexcept=0
Get reference to the source request.
void operator()(const generic_async_request_scheduler_t< Extra_Data_Factory > &handler) const
constexpr schedule_result_t ok() noexcept
Helper function to be used if scheduling was successful.
void operator()(const no_more_schedulers_t &) const
The scheduling of the actual processing was successful.
constexpr schedule_result_t failure() noexcept
Helper function to be used if scheduling failed.
std::enable_if< std::is_same< Parameter_Container, query_string_params_t >::value||std::is_same< Parameter_Container, router::route_params_t >::value, std::optional< Value_Type > >::type opt_value(const Parameter_Container ¶ms, string_view_t key)
Gets the value of a parameter specified by key wrapped in std::optional<Value_Type> if parameter exis...
Special type to be used as an indicator that there are no more schedulers in an async chain...
The scheduling of the actual processing failed. Note, that there is no additional information about t...
void make_not_implemented_response(const Request_Handle &req)
Helper to make a negative response with "Not Implemented" status.
schedule_result_t
Type for return value of a scheduler in a chain.
friend void next(unique_async_handling_controller_t< Extra_Data_Factory_For_Next > controller)
void next(unique_async_handling_controller_t< Extra_Data_Factory > controller)
Command to try to switch to the next handler in an async chain.
virtual actual_on_next_result_t on_next()=0
Command to try find a next scheduler to be invoked.
void make_internal_server_error_response(const Request_Handle &req)
Helper to make a negative response with "Internal Server Error" status.
unique_async_handling_controller_t< Extra_Data_Factory > & m_controller
virtual ~async_handling_controller_t()=default