IoT::MQTT

class MQTTClientEventDispatcher

File Information

Library: IoT/MQTT
Package: Generated
Header: IoT/MQTT/MQTTClientEventDispatcher.h

Description

The interface for MQTT clients.

Implementations are expected to receive their client ID and server URI via an implementation defined configuration mechanism. Once configured, a MQTTClient always uses the same client ID and connects to the same server. A MQTT client should automatically attempt to reconnect if the connection to the server is lost.

A single client instance can either support MQTT version 3.1/3.1.1 or version 5. Which MQTT version is supported by the client is determined when configuring the client.

Users of the class must call the appropriate methods supporting the client's configured MQTT version.

Inheritance

Direct Base Classes: Poco::RemotingNG::EventDispatcher

All Base Classes: Poco::RefCountedObject, Poco::RemotingNG::EventDispatcher

Member Summary

Member Functions: event__connectionClosed, event__connectionEstablished, event__connectionLost, event__disconnected, event__messageArrived, event__messageDelivered, event__messagePublished, remoting__typeId

Inherited Functions: accept, attributes, duplicate, protocol, referenceCount, release, removeEventFilter, setEventFilter, setEventFilterImpl, subscribe, transportForSubscriber, unsubscribe

Constructors

MQTTClientEventDispatcher

MQTTClientEventDispatcher(
    IMQTTClient * pInterface,
    const Poco::RemotingNG::Identifiable::ObjectId & objectId,
    const std::string & protocol
);

Destructor

~MQTTClientEventDispatcher virtual

virtual ~MQTTClientEventDispatcher();

Member Functions

event__connectionClosed

void event__connectionClosed(
    const void * pSender
);

event__connectionEstablished

void event__connectionEstablished(
    const void * pSender,
    const IoT::MQTT::ConnectionEstablishedEvent & data
);

event__connectionLost

void event__connectionLost(
    const void * pSender,
    const IoT::MQTT::ConnectionLostEvent & data
);

event__disconnected

void event__disconnected(
    const void * pSender,
    const IoT::MQTT::DisconnectedEvent & data
);

event__messageArrived

void event__messageArrived(
    const void * pSender,
    const IoT::MQTT::MessageArrivedEvent & data
);

event__messageDelivered

void event__messageDelivered(
    const void * pSender,
    const IoT::MQTT::MessageDeliveredEvent & data
);

event__messagePublished

void event__messagePublished(
    const void * pSender,
    const IoT::MQTT::MessagePublishedEvent & data
);

remoting__typeId virtual inline

virtual const Poco::RemotingNG::Identifiable::TypeId & remoting__typeId() const;

Securely control IoT edge devices from anywhere   Connect a Device