wotpy.protocols.mqtt.handlers.base¶
Base class for all MQTT handlers.
Classes
BaseMQTTHandler(mqtt_server) |
Base class for all MQTT handlers. |
-
class
wotpy.protocols.mqtt.handlers.base.BaseMQTTHandler(mqtt_server)¶ Bases:
objectBase class for all MQTT handlers.
-
handle_message(msg)¶ Called each time the runner receives a message for one of the handler topics.
-
init()¶ Initializes the MQTT handler. Called when the MQTT runner starts.
-
mqtt_server¶ MQTT server that contains this handler.
-
queue¶ Asynchronous queue where the handler leaves messages that should be published later by the runner.
-
servient_id¶ Servient ID that is used to avoid topic collisions øwhen multiple Servients are connected to the same broker.
-
teardown()¶ Destroys the MQTT handler. Called when the MQTT runner stops.
-
topics¶ List of topics that this MQTT handler wants to subscribe to.
-