Class PublishResult
java.lang.Object
org.mqtt4j.hato.PublishResult
Successful completion of a publication: the transport write for QoS 0, receipt of PUBACK
for QoS 1, or receipt of PUBCOMP for QoS 2. None confirms completion of any subscriber's
application processing.
-
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()static PublishResultof()Describes a successfully completed publication withReasonCode.SUCCESS.static PublishResultof(ReasonCode reasonCode) Describes a successfully completed publication withreasonCode.Returns the reason code of the MQTT 5.0 broker's acknowledgement: that of PUBACK for QoS 1, and that of PUBREC for QoS 2.toString()
-
Method Details
-
of
Describes a successfully completed publication withReasonCode.SUCCESS.- Returns:
a result whose [#reasonCode()] is [ReasonCode#SUCCESS]
-
of
Describes a successfully completed publication withreasonCode.- Parameters:
reasonCode- the reason code of the broker's acknowledgement- Returns:
a result whose [#reasonCode()] is `reasonCode`- Throws:
IllegalArgumentException-unless `reasonCode` is [ReasonCode#SUCCESS] or [ReasonCode#NO_MATCHING_SUBSCRIBERS]
-
reasonCode
Returns the reason code of the MQTT 5.0 broker's acknowledgement: that of PUBACK for QoS 1, and that of PUBREC for QoS 2.ReasonCode.NO_MATCHING_SUBSCRIBERSmeans that the broker accepted the message but had no subscription to deliver it to. Brokers may also reportReasonCode.SUCCESSin that case. QoS 0 and MQTT 3.1.1 reportReasonCode.SUCCESS.- Returns:
- the reason code of the MQTT 5.0 broker's acknowledgement: that of PUBACK for QoS 1, and that of PUBREC for QoS 2
-
equals
-
hashCode
-
toString
-