VLink  2.0.0
A high-performance communication middleware
vlink::SecuritySubscriber< MsgT > 模板类 参考

Convenience alias of Subscriber with per-message decryption enabled. 更多...

#include <subscriber.h>

类 vlink::SecuritySubscriber< MsgT > 继承关系图:
vlink::SecuritySubscriber< MsgT > 的协作图:

Public 类型

using UniquePtr = std::unique_ptr< SecuritySubscriber< MsgT > >
 Owning unique-pointer alias. 更多...
 
using SharedPtr = std::shared_ptr< SecuritySubscriber< MsgT > >
 Owning shared-pointer alias. 更多...
 

Public 成员函数

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

静态 Public 成员函数

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

额外继承的成员函数

详细描述

template<typename MsgT>
class vlink::SecuritySubscriber< MsgT >

Convenience alias of Subscriber with per-message decryption enabled.

Equivalent to Subscriber<MsgT, SecurityType::kWithSecurity>. Every inbound payload is decrypted with the configured Security::Config before the codec dispatcher is invoked.

注解
Security is not supported on intra:// or on dds:// CDR payloads.
模板参数
MsgTC++ message type to subscribe.

成员类型定义说明

◆ SharedPtr

template<typename MsgT >
using vlink::SecuritySubscriber< MsgT >::SharedPtr = std::shared_ptr<SecuritySubscriber<MsgT> >

Owning shared-pointer alias.

◆ UniquePtr

template<typename MsgT >
using vlink::SecuritySubscriber< MsgT >::UniquePtr = std::unique_ptr<SecuritySubscriber<MsgT> >

Owning unique-pointer alias.

构造及析构函数说明

◆ SecuritySubscriber() [1/2]

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

Constructs a SecuritySubscriber from a typed configuration object.

模板参数
ConfTConfiguration type derived from Conf.
SecurityConfigTForwardable Security::Config compatible type.
参数
confPopulated configuration aggregate.
sec_cfgSecurity configuration; empty uses the default symmetric slot.
typeWhether to call init() inline; default is InitType::kWithInit.

◆ SecuritySubscriber() [2/2]

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

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

Builds the base Subscriber 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.

模板参数
SecurityConfigTForwardable Security::Config compatible type.
参数
url_strTopic URL string.
sec_cfgSecurity configuration; empty uses the default symmetric slot.
typeWhether to call init() inline; default is InitType::kWithInit.

成员函数说明

◆ create_shared()

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

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

模板参数
SecurityConfigTForwardable Security::Config compatible type.
参数
url_strTopic URL string.
sec_cfgSecurity configuration; empty uses the default symmetric slot.
typeWhether to call init() inline; default is InitType::kWithInit.
返回
Owning SharedPtr to the new secure subscriber.

◆ create_unique()

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

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

模板参数
SecurityConfigTForwardable Security::Config compatible type.
参数
url_strTopic URL string.
sec_cfgSecurity configuration; empty uses the default symmetric slot.
typeWhether to call init() inline; default is InitType::kWithInit.
返回
Owning UniquePtr to the new secure subscriber.

该类的文档由以下文件生成: