MySQL 8.4.0
Source Code Documentation
Network_provider_management_interface Class Referenceabstract

Inversion of Control interface to manage Network providers. More...

#include <network_management_interface.h>

Inheritance diagram for Network_provider_management_interface:
[legend]

Public Member Functions

 Network_provider_management_interface ()
 
virtual ~Network_provider_management_interface ()
 
 Network_provider_management_interface (Network_provider_management_interface const &)=delete
 
Network_provider_management_interfaceoperator= (Network_provider_management_interface const &)=delete
 
 Network_provider_management_interface (Network_provider_management_interface &&)=default
 
Network_provider_management_interfaceoperator= (Network_provider_management_interface &&)=default
 
virtual bool initialize ()=0
 Initialize the network manager. More...
 
virtual bool finalize ()=0
 Finalize the network manager. More...
 
virtual void set_running_protocol (enum_transport_protocol new_value)=0
 Sets the running Communication Stack, thus defining the active provider. More...
 
virtual enum_transport_protocol get_running_protocol () const =0
 Gets the configured running protocol. More...
 
virtual enum_transport_protocol get_incoming_connections_protocol () const =0
 Get the incoming connections Communication Stack. More...
 
virtual void add_network_provider (std::shared_ptr< Network_provider > provider)=0
 Add a new Gcs_network_provider instance. More...
 
virtual void remove_all_network_provider ()=0
 
virtual void remove_network_provider (enum_transport_protocol provider_key)=0
 
virtual int is_xcom_using_ssl () const =0
 Return whether the SSL will be used to encrypt data or not. More...
 
virtual int xcom_set_ssl_mode (int mode)=0
 Set the operation mode which might be the following: More...
 
virtual int xcom_get_ssl_mode (const char *mode)=0
 Return the operation mode as an integer from an operation mode provided as a string. More...
 
virtual int xcom_get_ssl_mode ()=0
 Return the configured value into SSL mode. More...
 
virtual int xcom_set_ssl_fips_mode (int mode)=0
 Set the operation fips mode which might be the following: More...
 
virtual int xcom_get_ssl_fips_mode (const char *mode)=0
 Return the operation fips mode as an integer from an operation fips mode provided as a string. More...
 
virtual int xcom_get_ssl_fips_mode ()=0
 Returns the configured FIPS mode. More...
 
virtual void cleanup_secure_connections_context ()=0
 Cleans up SSL context directly into the active network provider. More...
 
virtual void delayed_cleanup_secure_connections_context ()=0
 Cleans up SSL context indirectly from the last active network provider. More...
 
virtual void finalize_secure_connections_context ()=0
 Destroys all things SSL related. More...
 

Detailed Description

Inversion of Control interface to manage Network providers.

Constructor & Destructor Documentation

◆ Network_provider_management_interface() [1/3]

Network_provider_management_interface::Network_provider_management_interface ( )
inlineexplicit

◆ ~Network_provider_management_interface()

virtual Network_provider_management_interface::~Network_provider_management_interface ( )
inlinevirtual

◆ Network_provider_management_interface() [2/3]

Network_provider_management_interface::Network_provider_management_interface ( Network_provider_management_interface const &  )
delete

◆ Network_provider_management_interface() [3/3]

Network_provider_management_interface::Network_provider_management_interface ( Network_provider_management_interface &&  )
default

Member Function Documentation

◆ add_network_provider()

virtual void Network_provider_management_interface::add_network_provider ( std::shared_ptr< Network_provider provider)
pure virtual

Add a new Gcs_network_provider instance.

Parameters
provideran already instantiated shared_ptr object of a Gcs_network_provider

Implemented in Network_provider_manager, and Network_Management_Interface.

◆ cleanup_secure_connections_context()

virtual void Network_provider_management_interface::cleanup_secure_connections_context ( )
pure virtual

Cleans up SSL context directly into the active network provider.

Implemented in Network_provider_manager, and Network_Management_Interface.

◆ delayed_cleanup_secure_connections_context()

virtual void Network_provider_management_interface::delayed_cleanup_secure_connections_context ( )
pure virtual

Cleans up SSL context indirectly from the last active network provider.

Implemented in Network_provider_manager, and Network_Management_Interface.

◆ finalize()

virtual bool Network_provider_management_interface::finalize ( )
pure virtual

Finalize the network manager.

It removes the default XCom provider,

Returns
true in case of error. false otherwise.

Implemented in Network_provider_manager, and Network_Management_Interface.

◆ finalize_secure_connections_context()

virtual void Network_provider_management_interface::finalize_secure_connections_context ( )
pure virtual

Destroys all things SSL related.

Implemented in Network_provider_manager, and Network_Management_Interface.

◆ get_incoming_connections_protocol()

virtual enum_transport_protocol Network_provider_management_interface::get_incoming_connections_protocol ( ) const
pure virtual

Get the incoming connections Communication Stack.

This is the value that is used to report upwards the protocol in * which we are currently accepting connections.

Returns
CommunicationStack

Implemented in Network_provider_manager, and Network_Management_Interface.

◆ get_running_protocol()

virtual enum_transport_protocol Network_provider_management_interface::get_running_protocol ( ) const
pure virtual

Gets the configured running protocol.

It returns the value that is currently configured in the Running Communication Stack

Since this value is dynamic, it can cause a mismatch from the provider that we are actively receiving connections and the provider that we use to establish new connections

Returns
CommunicationStack value.

Implemented in Network_provider_manager, and Network_Management_Interface.

◆ initialize()

virtual bool Network_provider_management_interface::initialize ( )
pure virtual

Initialize the network manager.

It also creates the default XCom provider and adds it to the manager.

Returns
true in case of error. false otherwise.

Implemented in Network_provider_manager, and Network_Management_Interface.

◆ is_xcom_using_ssl()

virtual int Network_provider_management_interface::is_xcom_using_ssl ( ) const
pure virtual

Return whether the SSL will be used to encrypt data or not.

Return 1 if it is enabled 0 otherwise.

Implemented in Network_provider_manager, and Network_Management_Interface.

◆ operator=() [1/2]

Network_provider_management_interface & Network_provider_management_interface::operator= ( Network_provider_management_interface &&  )
default

◆ operator=() [2/2]

Network_provider_management_interface & Network_provider_management_interface::operator= ( Network_provider_management_interface const &  )
delete

◆ remove_all_network_provider()

virtual void Network_provider_management_interface::remove_all_network_provider ( )
pure virtual

◆ remove_network_provider()

virtual void Network_provider_management_interface::remove_network_provider ( enum_transport_protocol  provider_key)
pure virtual

◆ set_running_protocol()

virtual void Network_provider_management_interface::set_running_protocol ( enum_transport_protocol  new_value)
pure virtual

Sets the running Communication Stack, thus defining the active provider.

In runtime, this is will change the way we establish connections.

Parameters
new_valuevalue of the Communication Stack

Implemented in Network_provider_manager, and Network_Management_Interface.

◆ xcom_get_ssl_fips_mode() [1/2]

virtual int Network_provider_management_interface::xcom_get_ssl_fips_mode ( )
pure virtual

Returns the configured FIPS mode.

Implemented in Network_provider_manager, and Network_Management_Interface.

◆ xcom_get_ssl_fips_mode() [2/2]

virtual int Network_provider_management_interface::xcom_get_ssl_fips_mode ( const char *  mode)
pure virtual

Return the operation fips mode as an integer from an operation fips mode provided as a string.

Note that the string must be provided in upper case letters and the possible values are: "OFF", "ON", "STRICT",

If a different value is provide, INVALID_SSL_MODE (-1) is returned.

Implemented in Network_provider_manager, and Network_Management_Interface.

◆ xcom_get_ssl_mode() [1/2]

virtual int Network_provider_management_interface::xcom_get_ssl_mode ( )
pure virtual

Return the configured value into SSL mode.

Implemented in Network_provider_manager, and Network_Management_Interface.

◆ xcom_get_ssl_mode() [2/2]

virtual int Network_provider_management_interface::xcom_get_ssl_mode ( const char *  mode)
pure virtual

Return the operation mode as an integer from an operation mode provided as a string.

Note that the string must be provided in upper case letters and the possible values are: "DISABLED", "PREFERRED", "REQUIRED", "VERIFY_CA" or "VERIFY_IDENTITY".

If a different value is provide, INVALID_SSL_MODE (-1) is returned.

Implemented in Network_provider_manager, and Network_Management_Interface.

◆ xcom_set_ssl_fips_mode()

virtual int Network_provider_management_interface::xcom_set_ssl_fips_mode ( int  mode)
pure virtual

Set the operation fips mode which might be the following:

. SSL_FIPS_MODE_OFF (0): This will set openssl fips mode value to 0

. SSL_FIPS_MODE_ON (1): This will set openssl fips mode value to 1

. SSL_FIPS_MODE_STRICT (2): This will set openssl fips mode value to 2

If a different value is provide, INVALID_SSL_FIPS_MODE (-1) is returned.

Implemented in Network_provider_manager, and Network_Management_Interface.

◆ xcom_set_ssl_mode()

virtual int Network_provider_management_interface::xcom_set_ssl_mode ( int  mode)
pure virtual

Set the operation mode which might be the following:

. SSL_DISABLED (1): The SSL mode will be disabled and this is the default value.

. SSL_PREFERRED (2): The SSL mode will be always disabled if this value is provided and is only allowed to keep the solution compatibility with MySQL server.

. SSL_REQUIRED (4): The SSL mode will be enabled but the verifications described in the next modes are not performed.

. SSL_VERIFY_CA (4) - Verify the server TLS certificate against the configured Certificate Authority (CA) certificates. The connection attempt fails if no valid matching CA certificates are found.

. SSL_VERIFY_IDENTITY (5): Like VERIFY_CA, but additionally verify that the server certificate matches the host to which the connection is attempted.

If a different value is provide, INVALID_SSL_MODE (-1) is returned.

Implemented in Network_provider_manager, and Network_Management_Interface.


The documentation for this class was generated from the following file: