24#ifndef NETWORK_PROVIDER_MANAGER_H 
   25#define NETWORK_PROVIDER_MANAGER_H 
   29#include <unordered_map> 
   82      std::shared_ptr<Network_provider> provider) 
override;
 
   91      std::shared_ptr<Network_provider> provider);
 
  381  std::unordered_map<enum_transport_protocol, std::shared_ptr<Network_provider>,
 
  441      std::shared_ptr<Network_provider> provider)
 override {
 
  472    return m_get_manager().configure_active_provider_secure_connections(params);
 
  501    m_get_manager().delayed_cleanup_secure_connections_context();
 
Proxy class to access funcionality in Network_provider_manager.
Definition: network_provider_manager.h:412
 
virtual ~Network_Management_Interface() override=default
 
Network_Management_Interface(Network_Management_Interface const &)=delete
 
bool stop_all_network_providers() override
Stops all network providers.
Definition: network_provider_manager.h:449
 
bool configure_active_provider(Network_configuration_parameters ¶ms) override
Configures the active provider.
Definition: network_provider_manager.h:465
 
void set_running_protocol(enum_transport_protocol new_value) override
Sets the running Communication Stack, thus defining the active provider.
Definition: network_provider_manager.h:429
 
bool stop_active_network_provider() override
Stops the active provider.
Definition: network_provider_manager.h:453
 
void delayed_cleanup_secure_connections_context() override
Cleans up SSL context indirectly from the last active network provider.
Definition: network_provider_manager.h:500
 
int xcom_get_ssl_fips_mode() override
Returns the configured FIPS mode.
Definition: network_provider_manager.h:494
 
void add_network_provider(std::shared_ptr< Network_provider > provider) override
Add a new Gcs_network_provider instance.
Definition: network_provider_manager.h:440
 
bool start_active_network_provider() override
Start the active provider.
Definition: network_provider_manager.h:445
 
enum_transport_protocol get_running_protocol() const override
Gets the configured running protocol.
Definition: network_provider_manager.h:433
 
int is_xcom_using_ssl() const override
Return whether the SSL will be used to encrypt data or not.
Definition: network_provider_manager.h:475
 
int xcom_set_ssl_mode(int mode) override
Set the operation mode which might be the following:
Definition: network_provider_manager.h:479
 
void remove_network_provider(enum_transport_protocol provider_key) override
Definition: network_provider_manager.h:457
 
Network_Management_Interface & operator=(Network_Management_Interface const &)=delete
 
int xcom_get_ssl_fips_mode(const char *mode) override
Return the operation fips mode as an integer from an operation fips mode provided as a string.
Definition: network_provider_manager.h:491
 
void cleanup_secure_connections_context() override
Cleans up SSL context directly into the active network provider.
Definition: network_provider_manager.h:497
 
int xcom_get_ssl_mode(const char *mode) override
Return the operation mode as an integer from an operation mode provided as a string.
Definition: network_provider_manager.h:482
 
int xcom_set_ssl_fips_mode(int mode) override
Set the operation fips mode which might be the following:
Definition: network_provider_manager.h:488
 
Network_Management_Interface()
Definition: network_provider_manager.h:414
 
std::function< Network_provider_manager &()> m_get_manager
Definition: network_provider_manager.h:508
 
int xcom_get_ssl_mode() override
Return the configured value into SSL mode.
Definition: network_provider_manager.h:485
 
enum_transport_protocol get_incoming_connections_protocol() const override
Get the incoming connections Communication Stack.
Definition: network_provider_manager.h:437
 
bool finalize() override
Finalize the network manager.
Definition: network_provider_manager.h:427
 
bool initialize() override
Initialize the network manager.
Definition: network_provider_manager.h:425
 
void remove_all_network_provider() override
Definition: network_provider_manager.h:461
 
bool configure_active_provider_secure_connections(Network_configuration_parameters ¶ms) override
COnfigures the active provider SSL parameters.
Definition: network_provider_manager.h:470
 
void finalize_secure_connections_context() override
Destroys all things SSL related.
Definition: network_provider_manager.h:503
 
Inversion of Control interface to manage Network providers.
Definition: network_management_interface.h:34
 
Manages all running instances of a network provider.
Definition: network_provider_manager.h:43
 
static Network_provider_manager & getInstance()
Definition: network_provider_manager.h:45
 
bool start_network_provider(enum_transport_protocol provider_key)
Starts an already added network provider.
Definition: network_provider_manager.cc:97
 
enum_transport_protocol get_incoming_connections_protocol() const override
Get the incoming connections Communication Stack.
Definition: network_provider_manager.h:173
 
bool finalize() override
Finalize the network manager.
Definition: network_provider_manager.cc:59
 
bool stop_network_provider(enum_transport_protocol provider_key)
Stops a running network provider.
Definition: network_provider_manager.cc:118
 
bool stop_active_network_provider() override
Stops the active provider.
Definition: network_provider_manager.cc:154
 
void cleanup_secure_connections_context() override
Cleans up SSL context.
Definition: network_provider_manager.cc:359
 
int xcom_get_ssl_mode() override
Return the configured value into SSL mode.
Definition: network_provider_manager.cc:351
 
Network_provider_manager & operator=(Network_provider_manager &&)=delete
 
int is_xcom_using_ssl() const override
Return whether the SSL will be used to encrypt data or not.
Definition: network_provider_manager.cc:296
 
Network_provider_manager(Network_provider_manager const &)=delete
 
int xcom_get_ssl_fips_mode() override
Returns the configured FIPS mode.
Definition: network_provider_manager.cc:324
 
void remove_all_network_provider() override
Removes all configured network providers.
Definition: network_provider_manager.cc:93
 
connection_descriptor * incoming_connection()
Method to call to get Server Connections that are waiting to be accepted.
Definition: network_provider_manager.cc:272
 
int close_xcom_connection(connection_descriptor *connection_handle)
Closes an open connection to another XCom endpoint served by the a Network provider.
Definition: network_provider_manager.cc:255
 
void delayed_cleanup_secure_connections_context() override
Cleans up SSL context indirectly from the last active network provider.
Definition: network_provider_manager.cc:353
 
void add_and_start_network_provider(std::shared_ptr< Network_provider > provider)
Add a new Gcs_network_provider instance and start it.
Definition: network_provider_manager.cc:80
 
enum_transport_protocol m_running_protocol
Definition: network_provider_manager.h:385
 
enum_transport_protocol m_incoming_connections_protocol
Definition: network_provider_manager.h:386
 
std::unordered_map< enum_transport_protocol, std::shared_ptr< Network_provider >, std::hash< int > > m_network_providers
Definition: network_provider_manager.h:383
 
const std::shared_ptr< Network_provider > get_incoming_connections_provider()
Retrieves the active provider for incoming connections.
Definition: network_provider_manager.cc:131
 
void add_network_provider(std::shared_ptr< Network_provider > provider) override
Add a new Gcs_network_provider instance.
Definition: network_provider_manager.cc:69
 
Network_configuration_parameters m_active_provider_secure_connections_configuration
Definition: network_provider_manager.h:393
 
const std::shared_ptr< Network_provider > get_provider(enum_transport_protocol provider)
Gets a configured provider.
Definition: network_provider_manager.cc:213
 
Network_provider_manager(Network_provider_manager &&)=delete
 
void set_incoming_connections_protocol(enum_transport_protocol value)
Definition: network_provider_manager.h:377
 
int m_ssl_fips_mode
Definition: network_provider_manager.h:389
 
connection_descriptor * open_xcom_connection(const char *server, xcom_port port, bool use_ssl, int connection_timeout=Network_provider::default_connection_timeout(), network_provider_dynamic_log_level log_level=network_provider_dynamic_log_level::PROVIDED)
Opens a new connection to another XCom endpoint served by the same Network provider.
Definition: network_provider_manager.cc:222
 
bool stop_all_network_providers() override
Stops all network providers.
Definition: network_provider_manager.cc:104
 
bool configure_active_provider_secure_connections(Network_configuration_parameters ¶ms) override
Configures the active provider with all things needed to establish SSL connections.
Definition: network_provider_manager.cc:185
 
void remove_network_provider(enum_transport_protocol provider_key) override
Remove an active network provider.
Definition: network_provider_manager.cc:88
 
virtual ~Network_provider_manager() override
Definition: network_provider_manager.h:375
 
bool configure_active_provider(Network_configuration_parameters ¶ms) override
Configures the active provider.
Definition: network_provider_manager.cc:167
 
bool start_active_network_provider() override
Start the active provider.
Definition: network_provider_manager.cc:135
 
bool initialize() override
Initialize the network manager.
Definition: network_provider_manager.cc:51
 
void set_running_protocol(enum_transport_protocol new_value) override
Sets the running Communication Stack, thus defining the active provider.
Definition: network_provider_manager.h:145
 
int xcom_set_ssl_mode(int mode) override
Set the operation mode which might be the following:
Definition: network_provider_manager.cc:342
 
const std::shared_ptr< Network_provider > get_active_provider()
Retrieves the active provider.
Definition: network_provider_manager.cc:126
 
Network_provider_manager()
Definition: network_provider_manager.h:370
 
Network_configuration_parameters m_active_provider_configuration
Definition: network_provider_manager.h:391
 
int xcom_set_ssl_fips_mode(int mode) override
Set the operation fips mode which might be the following:
Definition: network_provider_manager.cc:300
 
enum_transport_protocol get_running_protocol() const override
Gets the configured running protocol.
Definition: network_provider_manager.h:161
 
void finalize_secure_connections_context() override
Destroys all things SSL related.
Definition: network_provider_manager.cc:368
 
Network_provider_manager & operator=(Network_provider_manager const &)=delete
 
std::function< void()> m_ssl_data_context_cleaner
Definition: network_provider_manager.h:400
 
int m_ssl_mode
Definition: network_provider_manager.h:388
 
std::shared_ptr< Xcom_network_provider > m_xcom_network_provider
Definition: network_provider_manager.h:396
 
Inversion of Control proxy interface to operate Network providers.
Definition: network_management_interface.h:211
 
static constexpr int default_connection_timeout()
Definition: network_provider.h:466
 
mode
Definition: file_handle.h:61
 
@ FIPS_MODE_OFF
Definition: network_provider.h:71
 
enum_transport_protocol
Enum that describes the available XCom Communication Stacks.
Definition: network_provider.h:45
 
@ XCOM_PROTOCOL
Definition: network_provider.h:47
 
@ SSL_DISABLED
Definition: network_provider.h:57
 
network_provider_dynamic_log_level
Dynamic log level enum values.
Definition: network_provider.h:103
 
required uint64 port
Definition: replication_asynchronous_connection_failover.proto:33
 
Possible configuration parameters.
Definition: network_provider.h:191
 
Definition: node_connection.h:47
 
Definition: server_struct.h:39
 
unsigned short xcom_port
Definition: xcom_common.h:46