RESTinio
|
Interface of a controller of an async chan. More...
#include <common.hpp>
Public Types | |
using | actual_request_handle_t |
Short alias for request_handle type. | |
using | actual_async_request_scheduler_t |
Short alias for async_request_scheduler type. | |
using | actual_on_next_result_t |
Short alias for the result type of on_next method. |
Public Member Functions | |
virtual | ~async_handling_controller_t ()=default |
virtual const actual_request_handle_t & | request_handle () const noexcept=0 |
Get reference to the source request. |
Private Member Functions | |
virtual actual_on_next_result_t | on_next ()=0 |
Command to try find a next scheduler to be invoked. |
Friends | |
template<typename Extra_Data_Factory_For_Next> | |
void | next (unique_async_handling_controller_t< Extra_Data_Factory_For_Next > controller) |
Interface of a controller of an async chan.
All actual controllers have to implement this interface.
It's assumed that implementation of that interface won't be thread safe. It means that methods like request_handle() and on_next() must not be called in parallel.
Extra_Data_Factory | Type of factory for creation of extra data objects for every incoming request. Should be no_extra_data_factory_t if extra data for incoming requests is not needed. |
Definition at line 145 of file common.hpp.
using restinio::async_chain::async_handling_controller_t< Extra_Data_Factory >::actual_async_request_scheduler_t |
Short alias for async_request_scheduler type.
Definition at line 158 of file common.hpp.
using restinio::async_chain::async_handling_controller_t< Extra_Data_Factory >::actual_on_next_result_t |
Short alias for the result type of on_next method.
Definition at line 162 of file common.hpp.
using restinio::async_chain::async_handling_controller_t< Extra_Data_Factory >::actual_request_handle_t |
Short alias for request_handle type.
Definition at line 154 of file common.hpp.
|
virtualdefault |
|
nodiscardprivatepure virtual |
Command to try find a next scheduler to be invoked.
Implementation of async_handling_controller_t should switch to the next scheduler in the chain and return the scheduler to be called next. If there are no such schedulers, no_more_schedulers_t must be returned.
Implemented in restinio::async_chain::fixed_size_chain_t< Size, Extra_Data_Factory >::actual_controller_t, and restinio::async_chain::growable_size_chain_t< Extra_Data_Factory >::actual_controller_t.
|
nodiscardpure virtualnoexcept |
Get reference to the source request.
Usage example:
Implemented in restinio::async_chain::fixed_size_chain_t< Size, Extra_Data_Factory >::actual_controller_t, and restinio::async_chain::growable_size_chain_t< Extra_Data_Factory >::actual_controller_t.
|
friend |