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

Convenience alias of Getter with per-message decryption enabled. More...

#include <getter.h>

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

Public Types

using UniquePtr = std::unique_ptr< SecurityGetter< ValueT > >
 Owning unique-pointer alias. More...
 
using SharedPtr = std::shared_ptr< SecurityGetter< 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>>>
 SecurityGetter (const ConfT &conf, SecurityConfigT &&sec_cfg={}, InitType type=InitType::kWithInit)
 Constructs a SecurityGetter from a typed configuration object. More...
 
template<typename SecurityConfigT = Security::Config>
 SecurityGetter (const std::string &url_str, SecurityConfigT &&sec_cfg={}, InitType type=InitType::kWithInit)
 Constructs a SecurityGetter 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 SecurityGetter 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 SecurityGetter and wraps it in a std::shared_ptr. More...
 

Additional Inherited Members

Detailed Description

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

Convenience alias of Getter with per-message decryption enabled.

Equivalent to Getter<ValueT, SecurityType::kWithSecurity>. Each incoming payload is decrypted before codec dispatch and caching.

Template Parameters
ValueTValue type to read.

Member Typedef Documentation

◆ SharedPtr

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

Owning shared-pointer alias.

◆ UniquePtr

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

Owning unique-pointer alias.

Constructor & Destructor Documentation

◆ SecurityGetter() [1/2]

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

Constructs a SecurityGetter 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:

◆ SecurityGetter() [2/2]

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

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

Builds the base Getter 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 >
SecurityGetter< ValueT >::SharedPtr vlink::SecurityGetter< ValueT >::create_shared ( const std::string &  url_str,
SecurityConfigT &&  sec_cfg = {},
InitType  type = InitType::kWithInit 
)
inlinestatic

Heap-allocates a SecurityGetter 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 getter.

◆ create_unique()

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

Heap-allocates a SecurityGetter 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 getter.

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