unsubscribeMpn method
Operation method that unsubscribes an MpnSubscription from the server's MPN Module.
This operation removes the MpnSubscription from the list of "active" subscriptions.
General Edition Note MPN is an optional feature, available depending on Edition and License Type. To know what features are enabled by your license, please see the License tab of the Monitoring Dashboard (by default, available at /dashboard).
Lifecycle An MpnSubscription can be unsubscribed from at any time. Once done the MpnSubscription immediately exits the "active" state.
Note that forwarding of the unsubscription to the server is made in a separate thread.
The unsubscription will be notified through an MpnSubscriptionListener.onUnsubscription event.
sub
An "active" MpnSubscription object.
Throws IllegalStateException if the given MPN subscription is not active.
Throws IllegalStateException if there is no MPN device registered.
- See subscribe
- See unsubscribeMpnSubscriptions
⚠ WARNING ⚠ The completion of the returned Future indicates that the operation has been accepted and is in progress, but not necessarily completed. To receive notifications about events generated by the operation, it is necessary to register an MpnSubscriptionListener.
Implementation
Future<void> unsubscribeMpn(MpnSubscription sub) async {
var arguments = <String, dynamic>{
'mpnSubId': sub._id
};
return await NativeBridge.instance.client_unsubscribeMpn(_id, sub._id, arguments);
}