26#ifndef ROUTER_SRC_HTTP_SRC_HTTP_REQUEST_ROUTER_H_
27#define ROUTER_SRC_HTTP_SRC_HTTP_REQUEST_ROUTER_H_
29#include <unicode/regex.h>
32#include <shared_mutex>
48 void append(
const std::string &url_regex_str,
49 std::unique_ptr<RequestHandler> cb);
50 void remove(
const void *handler_id);
51 void remove(
const std::string &url_regex_str);
53 void set_default_route(std::unique_ptr<RequestHandler> cb);
54 void clear_default_route();
57 void require_realm(
const std::string &realm) { require_realm_ = realm; }
63 : url_pattern_(
std::move(url_pattern)), handler_(
std::move(
handler)) {}
70 const icu::UnicodeString &input)
const;
74 const std::string &
url_pattern()
const {
return url_pattern_; }
Definition: http_request_router.h:60
RouteMatcher(std::string url_pattern, BaseRequestHandlerPtr handler)
Definition: http_request_router.h:62
std::unique_ptr< icu::RegexPattern > regex_pattern_
Definition: http_request_router.h:80
const std::string & url_pattern() const
Definition: http_request_router.h:74
std::string url_pattern_
Definition: http_request_router.h:77
BaseRequestHandlerPtr handler_
Definition: http_request_router.h:78
BaseRequestHandlerPtr handler() const
Definition: http_request_router.h:72
Definition: http_request_router.h:43
std::shared_mutex route_mtx_
Definition: http_request_router.h:92
void require_realm(const std::string &realm)
Definition: http_request_router.h:57
std::shared_ptr< http::base::RequestHandler > BaseRequestHandlerPtr
Definition: http_request_router.h:46
std::string require_realm_
Definition: http_request_router.h:90
std::vector< RouteMatcher > request_handlers_
Definition: http_request_router.h:87
BaseRequestHandlerPtr default_route_
Definition: http_request_router.h:89
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4583
Definition: request_handler.h:36
Definition: request_handler_interface.h:36
virtual void route(http::base::Request &request)=0
Definition: expected.h:286
#define HTTP_SERVER_LIB_EXPORT
Definition: http_server_lib_export.h:15
static char * path
Definition: mysqldump.cc:149
static mysql_service_status_t remove(reference_caching_channel channel, const char *implementation_name) noexcept
Definition: component.cc:137
Definition: gcs_xcom_synode.h:64