Class MqttSubscribeResult

    • Method Detail

      • getMaximumQualityOfService

        public PlccomMqttQualityOfService getMaximumQualityOfService()
        Returns the requested maximum QoS.
        Returns:
        maximum QoS for matching messages
      • isActive

        public boolean isActive()
        Returns whether this high-level handle has not been unsubscribed yet.

        This is local handle state. It is updated by unsubscribe() and is not a broker-side session query.

        Specified by:
        isActive in interface MqttSubscriptionHandle
        Returns:
        true until this handle successfully unsubscribes
      • unsubscribe

        public MqttUnsubscribeResult unsubscribe()
        Unsubscribes the Topic Filter represented by this subscribe result.

        The first call sends the MQTT UNSUBSCRIBE request. Repeated calls are local no-ops and return a result with MqttUnsubscribeResult.isRequestSent() set to false. This makes cleanup code simple while still avoiding duplicate network UNSUBSCRIBE packets from the same handle.

        Specified by:
        unsubscribe in interface MqttSubscriptionHandle
        Returns:
        unsubscribe result for this Topic Filter