wotpy.protocols.mqtt.server¶
Class that implements the MQTT server (broker).
Classes
MQTTServer(broker_url[, …]) |
MQTT binding server implementation. |
-
class
wotpy.protocols.mqtt.server.MQTTServer(broker_url, property_callback_ms=None, event_callback_ms=None, servient_id=None)¶ Bases:
wotpy.protocols.server.BaseProtocolServerMQTT binding server implementation.
-
DEFAULT_SERVIENT_ID= 'wotpy'¶
-
build_base_url(hostname, thing)¶ Returns the base URL for the given Thing in the context of this server.
-
build_forms(hostname, interaction)¶ Builds and returns a list with all Forms that are linked to this server for the given Interaction.
-
protocol¶ Protocol of this server instance. A member of the Protocols enum.
-
servient_id¶ Servient ID that is used to avoid topic collisions øwhen multiple Servients are connected to the same broker.
-
start()¶ Starts the MQTT broker and all the MQTT clients that handle the WoT clients requests.
-
stop()¶ Stops the MQTT broker and the MQTT clients.
-