MQTTSuite
Loading...
Searching...
No Matches
mqtt::mqttbroker::SocketContextFactory Class Reference

#include <SocketContextFactory.h>

Inheritance diagram for mqtt::mqttbroker::SocketContextFactory:
Collaboration diagram for mqtt::mqttbroker::SocketContextFactory:

Public Member Functions

 SocketContextFactory (const std::shared_ptr< iot::mqtt::server::broker::Broker > broker)
core::socket::stream::SocketContext * create (core::socket::stream::SocketConnection *socketConnectionr) final

Private Attributes

const std::shared_ptr< iot::mqtt::server::broker::Broker > broker

Detailed Description

Definition at line 59 of file SocketContextFactory.h.

Constructor & Destructor Documentation

◆ SocketContextFactory()

mqtt::mqttbroker::SocketContextFactory::SocketContextFactory ( const std::shared_ptr< iot::mqtt::server::broker::Broker > broker)
explicit

Definition at line 61 of file SocketContextFactory.cpp.

62 : broker(broker) {
63 }
const std::shared_ptr< iot::mqtt::server::broker::Broker > broker

Member Function Documentation

◆ create()

core::socket::stream::SocketContext * mqtt::mqttbroker::SocketContextFactory::create ( core::socket::stream::SocketConnection * socketConnectionr)
final

Definition at line 65 of file SocketContextFactory.cpp.

65 {
66 return new iot::mqtt::SocketContext(
67 socketConnectionr,
68 new mqtt::mqttbroker::lib::Mqtt(
69 socketConnectionr->getConnectionName(),
70 broker,
71 mqtt::lib::JsonMappingReader::readMappingFromFile(utils::Config::getStringOptionValue("--mqtt-mapping-file"))["mapping"]));
72 }
static nlohmann::json & readMappingFromFile(const std::string &mapFilePath)

References mqtt::lib::JsonMappingReader::readMappingFromFile().

Here is the call graph for this function:

Member Data Documentation

◆ broker

const std::shared_ptr<iot::mqtt::server::broker::Broker> mqtt::mqttbroker::SocketContextFactory::broker
private

Definition at line 66 of file SocketContextFactory.h.


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