VLink  2.0.0
A high-performance communication middleware
vlink::SecuritySetter< ValueT > Class Template Reference

Convenience alias of Setter with per-message encryption enabled. More...

#include <setter.h>

Inheritance diagram for vlink::SecuritySetter< ValueT >:
Collaboration diagram for vlink::SecuritySetter< ValueT >:

Public Types

using UniquePtr = std::unique_ptr< SecuritySetter< ValueT > >
 Owning unique-pointer alias. More...
 
using SharedPtr = std::shared_ptr< SecuritySetter< ValueT > >
 Owning shared-pointer alias. More...
 

Public Member Functions

template<typename ConfT , typename SecurityConfigT = Security::Config, typename = std::enable_if_t<std::is_base_of_v<Conf, ConfT>>>
 SecuritySetter (const ConfT &conf, SecurityConfigT &&sec_cfg={}, InitType type=InitType::kWithInit)
 Constructs a SecuritySetter from a typed configuration object. More...
 
template<typename SecurityConfigT = Security::Config>
 SecuritySetter (const std::string &url_str, SecurityConfigT &&sec_cfg={}, InitType type=InitType::kWithInit)
 Constructs a SecuritySetter from a URL string and installs the security configuration. More...
 

Static Public Member Functions

template<typename SecurityConfigT = Security::Config>
static UniquePtr create_unique (const std::string &url_str, SecurityConfigT &&sec_cfg={}, InitType type=InitType::kWithInit)
 Heap-allocates a SecuritySetter and wraps it in a std::unique_ptr. More...
 
template<typename SecurityConfigT = Security::Config>
static SharedPtr create_shared (const std::string &url_str, SecurityConfigT &&sec_cfg={}, InitType type=InitType::kWithInit)
 Heap-allocates a SecuritySetter and wraps it in a std::shared_ptr. More...
 

Additional Inherited Members

Detailed Description

template<typename ValueT>
class vlink::SecuritySetter< ValueT >

Convenience alias of Setter with per-message encryption enabled.

Equivalent to Setter<ValueT, SecurityType::kWithSecurity>. Each outgoing payload is encrypted before transmission.

Template Parameters
ValueTValue type to write.

Member Typedef Documentation

◆ SharedPtr

template<typename ValueT >
using vlink::SecuritySetter< ValueT >::SharedPtr = std::shared_ptr<SecuritySetter<ValueT> >

Owning shared-pointer alias.

◆ UniquePtr

template<typename ValueT >
using vlink::SecuritySetter< ValueT >::UniquePtr = std::unique_ptr<SecuritySetter<ValueT> >

Owning unique-pointer alias.

Constructor & Destructor Documentation

◆ SecuritySetter() [1/2]

template<typename ValueT >
template<typename ConfT , typename SecurityConfigT , typename >
vlink::SecuritySetter< ValueT >::SecuritySetter ( const ConfT &  conf,
SecurityConfigT &&  sec_cfg = {},
InitType  type = InitType::kWithInit 
)
inlineexplicit

Constructs a SecuritySetter from a typed configuration object.

Template Parameters
ConfTConfiguration type derived from Conf.
SecurityConfigTForwardable Security::Config compatible type.
Parameters
confPopulated configuration aggregate.
sec_cfgSecurity configuration; empty uses the default symmetric slot.
typeWhether to call init() inline; default is InitType::kWithInit.
Here is the call graph for this function:

◆ SecuritySetter() [2/2]

template<typename ValueT >
template<typename SecurityConfigT >
vlink::SecuritySetter< ValueT >::SecuritySetter ( const std::string &  url_str,
SecurityConfigT &&  sec_cfg = {},
InitType  type = InitType::kWithInit 
)
inlineexplicit

Constructs a SecuritySetter from a URL string and installs the security configuration.

Builds the base Setter in kWithoutInit mode, installs sec_cfg via enable_security(), then calls init() unless deferred. When enable_security() fails to produce a usable NodeImpl::security the subsequent init() will fail.

Template Parameters
SecurityConfigTForwardable Security::Config compatible type.
Parameters
url_strField URL string.
sec_cfgSecurity configuration; empty uses the default symmetric slot.
typeWhether to call init() inline; default is InitType::kWithInit.
Here is the call graph for this function:

Member Function Documentation

◆ create_shared()

template<typename ValueT >
template<typename SecurityConfigT >
SecuritySetter< ValueT >::SharedPtr vlink::SecuritySetter< ValueT >::create_shared ( const std::string &  url_str,
SecurityConfigT &&  sec_cfg = {},
InitType  type = InitType::kWithInit 
)
inlinestatic

Heap-allocates a SecuritySetter and wraps it in a std::shared_ptr.

Template Parameters
SecurityConfigTForwardable Security::Config compatible type.
Parameters
url_strField URL string.
sec_cfgSecurity configuration; empty uses the default symmetric slot.
typeWhether to call init() inline; default is InitType::kWithInit.
Returns
Owning SharedPtr to the new secure setter.

◆ create_unique()

template<typename ValueT >
template<typename SecurityConfigT >
SecuritySetter< ValueT >::UniquePtr vlink::SecuritySetter< ValueT >::create_unique ( const std::string &  url_str,
SecurityConfigT &&  sec_cfg = {},
InitType  type = InitType::kWithInit 
)
inlinestatic

Heap-allocates a SecuritySetter and wraps it in a std::unique_ptr.

Template Parameters
SecurityConfigTForwardable Security::Config compatible type.
Parameters
url_strField URL string.
sec_cfgSecurity configuration; empty uses the default symmetric slot.
typeWhether to call init() inline; default is InitType::kWithInit.
Returns
Owning UniquePtr to the new secure setter.

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