|
RESTinio
|
Interface of a controller of an async chan. More...
#include <common.hpp>
Public Types | |
| using | actual_request_handle_t = generic_request_handle_t< typename Extra_Data_Factory::data_t > |
| Short alias for request_handle type. More... | |
| using | actual_async_request_scheduler_t = generic_async_request_scheduler_t< typename Extra_Data_Factory::data_t > |
| Short alias for async_request_scheduler type. More... | |
| using | actual_on_next_result_t = on_next_result_t< Extra_Data_Factory > |
| Short alias for the result type of on_next method. More... | |
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. More... | |
Private Member Functions | |
| virtual actual_on_next_result_t | on_next ()=0 |
| Command to try find a next scheduler to be invoked. More... | |
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 76 of file common.hpp.
| using restinio::async_chain::async_handling_controller_t< Extra_Data_Factory >::actual_async_request_scheduler_t = generic_async_request_scheduler_t< typename Extra_Data_Factory::data_t > |
Short alias for async_request_scheduler type.
Definition at line 159 of file common.hpp.
| using restinio::async_chain::async_handling_controller_t< Extra_Data_Factory >::actual_on_next_result_t = on_next_result_t< Extra_Data_Factory > |
Short alias for the result type of on_next method.
Definition at line 163 of file common.hpp.
| using restinio::async_chain::async_handling_controller_t< Extra_Data_Factory >::actual_request_handle_t = generic_request_handle_t< typename Extra_Data_Factory::data_t > |
Short alias for request_handle type.
Definition at line 155 of file common.hpp.
|
virtualdefault |
|
privatepure 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::growable_size_chain_t< Extra_Data_Factory >::actual_controller_t, and restinio::async_chain::fixed_size_chain_t< Size, Extra_Data_Factory >::actual_controller_t.
|
pure virtualnoexcept |
Get reference to the source request.
Usage example:
Implemented in restinio::async_chain::growable_size_chain_t< Extra_Data_Factory >::actual_controller_t, and restinio::async_chain::fixed_size_chain_t< Size, Extra_Data_Factory >::actual_controller_t.
|
friend |
1.8.14