MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
handler_factory.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2022, 2025, Oracle and/or its affiliates.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License, version 2.0,
6 as published by the Free Software Foundation.
7
8 This program is designed to work with certain software (including
9 but not limited to OpenSSL) that is licensed under separate terms,
10 as designated in a particular file or component or in included license
11 documentation. The authors of MySQL hereby grant you an additional
12 permission to link the program and your derivative works with the
13 separately licensed software that they have either included with
14 the program or referenced in the documentation.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24*/
25
26#ifndef ROUTER_SRC_REST_MRS_SRC_MRS_ENDPOINT_HANDLER_HANDLER_FACTORY_H_
27#define ROUTER_SRC_REST_MRS_SRC_MRS_ENDPOINT_HANDLER_HANDLER_FACTORY_H_
28
29#include <memory>
30
38
39namespace mrs {
40namespace endpoint {
41
43 public:
48 std::shared_ptr<mrs::interface::EndpointConfiguration>;
49
50 public:
51 HandlerFactory(AuthorizeManager *auth_manager, GtidManager *gtid_manager,
52 MysqlCacheManager *cache_manager,
53 ResponseCache *response_cache, ResponseCache *file_cache,
54 SlowQueryMonitor *slow_query_monitor,
55 MysqlTaskMonitor *task_monitor,
57
58 std::shared_ptr<handler::PersistentDataContentFile>
60 const OptionalIndexNames &index_names) override;
61
62 std::shared_ptr<Handler> create_db_service_debug_handler(
63 EndpointBasePtr db_service_endpoint) override;
64
65 std::shared_ptr<Handler> create_db_service_metadata_handler(
66 EndpointBasePtr db_service_endpoint) override;
67
68 std::shared_ptr<Handler> create_db_schema_metadata_catalog_handler(
69 EndpointBasePtr db_schema_endpoint) override;
70 std::shared_ptr<Handler> create_db_schema_metadata_handler(
71 EndpointBasePtr db_schema_endpoint) override;
72
73 std::shared_ptr<Handler> create_db_schema_openapi_handler(
74 EndpointBasePtr endpoint) override;
75 std::shared_ptr<Handler> create_db_service_openapi_handler(
76 EndpointBasePtr endpoint) override;
77 std::shared_ptr<Handler> create_db_object_openapi_handler(
78 EndpointBasePtr endpoint) override;
79
80 std::shared_ptr<Handler> create_db_object_handler(
81 EndpointBasePtr db_object_endpoint) override;
82 std::shared_ptr<Handler> create_db_object_metadata_handler(
83 EndpointBasePtr db_object_endpoint) override;
84 std::shared_ptr<Handler> create_content_file(
85 EndpointBasePtr db_object_endpoint,
86 std::shared_ptr<handler::PersistentDataContentFile> persistent_data)
87 override;
88
89 std::shared_ptr<Handler> create_string_handler(
90 EndpointBasePtr endpoint, const UniversalId &service_id,
91 bool requires_authentication, const Uri &url, const std::string &path,
92 const std::string &file_name, const std::string &file_content,
93 bool is_index) override;
94 std::shared_ptr<Handler> create_redirection_handler(
95 EndpointBasePtr endpoint, const UniversalId &service_id,
96 bool requires_authentication, const Uri &url, const std::string &path,
97 const std::string &file_name, const std::string &redirection_path,
98 const bool pernament) override;
99
100 std::shared_ptr<Handler> create_authentication_login(
101 EndpointBasePtr db_service_endpoint) override;
102 std::shared_ptr<Handler> create_authentication_logout(
103 EndpointBasePtr db_service_endpoint) override;
104 std::shared_ptr<Handler> create_authentication_completed(
105 EndpointBasePtr db_service_endpoint) override;
106 std::shared_ptr<Handler> create_authentication_user(
107 EndpointBasePtr db_service_endpoint) override;
108 std::shared_ptr<Handler> create_authentication_auth_apps(
109 EndpointBasePtr db_service_endpoint) override;
110 std::shared_ptr<Handler> create_authentication_status(
111 EndpointBasePtr db_service_endpoint) override;
112
113 private:
122};
123
124} // namespace endpoint
125} // namespace mrs
126
127#endif // ROUTER_SRC_REST_MRS_SRC_MRS_ENDPOINT_HANDLER_HANDLER_FACTORY_H_
Definition: mysql_cache_manager.h:87
Definition: uri.h:40
Definition: gtid_manager.h:50
Definition: response_cache.h:64
Definition: mysql_task_monitor.h:41
Definition: slow_query_monitor.h:47
Definition: handler_factory.h:42
std::shared_ptr< Handler > create_content_file(EndpointBasePtr db_object_endpoint, std::shared_ptr< handler::PersistentDataContentFile > persistent_data) override
Definition: handler_factory.cc:336
std::shared_ptr< Handler > create_db_object_openapi_handler(EndpointBasePtr endpoint) override
Definition: handler_factory.cc:311
std::shared_ptr< Handler > create_authentication_login(EndpointBasePtr db_service_endpoint) override
Definition: handler_factory.cc:388
MysqlTaskMonitor * task_monitor_
Definition: handler_factory.h:120
SlowQueryMonitor * slow_query_monitor_
Definition: handler_factory.h:119
std::shared_ptr< Handler > create_db_service_debug_handler(EndpointBasePtr db_service_endpoint) override
Definition: handler_factory.cc:256
std::shared_ptr< Handler > create_db_object_handler(EndpointBasePtr db_object_endpoint) override
Definition: handler_factory.cc:216
std::shared_ptr< mrs::interface::EndpointConfiguration > EndpointConfigurationPtr
Definition: handler_factory.h:48
MysqlCacheManager * cache_manager_
Definition: handler_factory.h:116
std::shared_ptr< Handler > create_db_service_metadata_handler(EndpointBasePtr db_service_endpoint) override
Definition: handler_factory.cc:269
EndpointConfigurationPtr configuration_
Definition: handler_factory.h:121
std::shared_ptr< Handler > create_db_schema_openapi_handler(EndpointBasePtr endpoint) override
Definition: handler_factory.cc:186
ResponseCache * file_cache_
Definition: handler_factory.h:118
std::shared_ptr< Handler > create_redirection_handler(EndpointBasePtr endpoint, const UniversalId &service_id, bool requires_authentication, const Uri &url, const std::string &path, const std::string &file_name, const std::string &redirection_path, const bool pernament) override
Definition: handler_factory.cc:367
ResponseCache * response_cache_
Definition: handler_factory.h:117
std::shared_ptr< Handler > create_authentication_status(EndpointBasePtr db_service_endpoint) override
Definition: handler_factory.cc:538
std::shared_ptr< Handler > create_db_service_openapi_handler(EndpointBasePtr endpoint) override
Definition: handler_factory.cc:201
std::shared_ptr< Handler > create_db_schema_metadata_catalog_handler(EndpointBasePtr db_schema_endpoint) override
Definition: handler_factory.cc:171
HandlerFactory(AuthorizeManager *auth_manager, GtidManager *gtid_manager, MysqlCacheManager *cache_manager, ResponseCache *response_cache, ResponseCache *file_cache, SlowQueryMonitor *slow_query_monitor, MysqlTaskMonitor *task_monitor, const EndpointConfigurationPtr &configuration)
Definition: handler_factory.cc:154
std::shared_ptr< Handler > create_authentication_completed(EndpointBasePtr db_service_endpoint) override
Definition: handler_factory.cc:448
std::shared_ptr< Handler > create_authentication_logout(EndpointBasePtr db_service_endpoint) override
Definition: handler_factory.cc:419
std::shared_ptr< Handler > create_string_handler(EndpointBasePtr endpoint, const UniversalId &service_id, bool requires_authentication, const Uri &url, const std::string &path, const std::string &file_name, const std::string &file_content, bool is_index) override
Definition: handler_factory.cc:351
std::shared_ptr< handler::PersistentDataContentFile > create_persisten_content_file(EndpointBasePtr conent_file_endpoint, const OptionalIndexNames &index_names) override
Definition: handler_factory.cc:326
std::shared_ptr< Handler > create_authentication_auth_apps(EndpointBasePtr db_service_endpoint) override
Definition: handler_factory.cc:508
AuthorizeManager * auth_manager_
Definition: handler_factory.h:114
std::shared_ptr< Handler > create_authentication_user(EndpointBasePtr db_service_endpoint) override
Definition: handler_factory.cc:479
std::shared_ptr< Handler > create_db_schema_metadata_handler(EndpointBasePtr db_schema_endpoint) override
Definition: handler_factory.cc:283
GtidManager * gtid_manager_
Definition: handler_factory.h:115
std::shared_ptr< Handler > create_db_object_metadata_handler(EndpointBasePtr db_object_endpoint) override
Definition: handler_factory.cc:297
Definition: authorize_manager.h:58
Definition: handler_factory.h:43
EndpointBase::OptionalIndexNames OptionalIndexNames
Definition: handler_factory.h:50
std::shared_ptr< EndpointBase > EndpointBasePtr
Definition: handler_factory.h:46
static char * path
Definition: mysqldump.cc:150
std::string file_name(Log_file_id file_id)
Provides name of the log file with the given file id, e.g.
Definition: log0pre_8_0_30.cc:94
collector::MysqlCacheManager MysqlCacheManager
Definition: handler_db_object_table.cc:266
ContentFileEndpoint::UniversalId UniversalId
Definition: content_file_endpoint.cc:39
Definition: authorize_manager.h:48
required string configuration
Definition: replication_asynchronous_connection_failover.proto:49