/** * Given a PUBLISH command determine if it will expect an ACK based on the * QoS of the Publish command and the QoS of this subscription. * * @param publish The publish command to inspect. * @return true if the client will expect an PUBACK for this PUBLISH. */ public boolean expectAck(PUBLISH publish) { QoS publishQoS = publish.qos(); if (publishQoS.compareTo(this.qos) > 0) { publishQoS = this.qos; } return !publishQoS.equals(QoS.AT_MOST_ONCE); }
/** * Given a PUBLISH command determine if it will expect an ACK based on the * QoS of the Publish command and the QoS of this subscription. * * @param publish The publish command to inspect. * @return true if the client will expect an PUBACK for this PUBLISH. */ public boolean expectAck(PUBLISH publish) { QoS publishQoS = publish.qos(); if (publishQoS.compareTo(this.qos) > 0) { publishQoS = this.qos; } return !publishQoS.equals(QoS.AT_MOST_ONCE); }
/** * Given a PUBLISH command determine if it will expect an ACK based on the * QoS of the Publish command and the QoS of this subscription. * * @param publish * The publish command to inspect. * * @return true if the client will expect an PUBACK for this PUBLISH. */ public boolean expectAck(PUBLISH publish) { QoS publishQoS = publish.qos(); if (publishQoS.compareTo(this.qos) > 0){ publishQoS = this.qos; } return !publishQoS.equals(QoS.AT_MOST_ONCE); }
/** * Given a PUBLISH command determine if it will expect an ACK based on the * QoS of the Publish command and the QoS of this subscription. * * @param publish * The publish command to inspect. * * @return true if the client will expect an PUBACK for this PUBLISH. */ public boolean expectAck(PUBLISH publish) { QoS publishQoS = publish.qos(); if (publishQoS.compareTo(this.qos) > 0){ publishQoS = this.qos; } return !publishQoS.equals(QoS.AT_MOST_ONCE); }
/** * Given a PUBLISH command determine if it will expect an ACK based on the * QoS of the Publish command and the QoS of this subscription. * * @param publish * The publish command to inspect. * * @return true if the client will expect an PUBACK for this PUBLISH. */ public boolean expectAck(PUBLISH publish) { QoS publishQoS = publish.qos(); if (publishQoS.compareTo(this.qos) > 0){ publishQoS = this.qos; } return !publishQoS.equals(QoS.AT_MOST_ONCE); }