IOT Dash
|
Public Member Functions | |
MqttNet_Mediator (HostedMqttService serviceRoot, IServiceProvider provider) | |
override int | TargetCountOnChannel (string key) |
override bool | HasSubscribersOnTopic (string topic) |
override IEnumerable< ITarget< string, MqttApplicationMessage > > | GetChannelCopy (string key) |
override void | Subscribe (string topic, ITarget< string, MqttApplicationMessage > target, out ISubscription subscription) |
override void | Subscribe (string topic, ITarget< string, MqttApplicationMessage > target, SubscriptionGuard guard) |
override void | Unsubscribe (ISubscription< string, MqttApplicationMessage > subscription) |
![]() | |
abstract bool | HasSubscribersOnTopic (string topic) |
MqttApplicationMessage? | GetRetained (string topic) |
override Task | Send (string channel, object sender, MqttApplicationMessage msg) |
Task | Send (string topic, object sender, string content) |
![]() | |
virtual void | Subscribe (TChannelKey msgChannel, ITarget< TChannelKey, TMsg > target, out ISubscription subscription) |
virtual void | Subscribe (TChannelKey msgChannel, ITarget< TChannelKey, TMsg > target, SubscriptionGuard guard) |
abstract int | TargetCountOnChannel (TChannelKey key) |
abstract IEnumerable< ITarget< TChannelKey, TMsg > > | GetChannelCopy (TChannelKey key) |
abstract void | Unsubscribe (ISubscription< TChannelKey, TMsg > subscription) |
abstract Task | Send (TChannelKey msgChannel, object sender, TMsg msg) |
Protected Member Functions | |
override async Task | MqttSend (string msgChannel, object sender, MqttApplicationMessage msg) |
override void | SubscribeInternal (string topic, ITarget< string, MqttApplicationMessage > target) |
abstract Task | MqttSend (string channel, object sender, MqttApplicationMessage msg) |
![]() | |
abstract void | SubscribeInternal (TChannelKey msgChannel, ITarget< TChannelKey, TMsg > target) |
Properties | |
override int | TargetCount [get] |
override IEnumerable< string > | Keys [get] |
![]() | |
abstract int | TargetCount [get] |
abstract IEnumerable< TChannelKey > | Keys [get] |
A component of the HostedMqttService. Specialisation of MqttMediator designed to work with the MQTTnet.Client.MqttClient.
|
virtual |
Check if there are any subscribers on given topic .
topic | The topic to check. |
true
if there are any subscribers.Implements IotDash.Services.Mqtt.MqttMediator.
|
inlineprotectedvirtual |
Send or receive a message. If the sender is the associated HostedMqttService, then the message is broadcasted to in-application listeners. Otherwise the sender is from inside the application, so the message is sent to the broker.
msgChannel | The MQTT topic. |
sender | Sender of the message. |
msg | Message to send. |
Implements IotDash.Services.Mqtt.MqttMediator.
|
inline |
Subscribe target to all messages on given MQTT topic producing a subscription .
topic | The topic to subscribe to. |
target | The target of the events. |
subscription | Subscription object. |
|
inline |
Subscribe target to all messages on given MQTT topic registering the produced subscription under a given guard .
topic | The topic to subscribe to. |
target | The target of the events. |
guard | Subscription guard under which to register produced ISubscription. |
|
inline |
Cancel the given subscription .
subscription | The subscription to cancel. |