/** * Sets up the will information, based on the supplied parameters. * * @param topic the topic to send the LWT message to * @param msg the {@link MqttMessage} to send * @param qos the QoS Level to send the message at * @param retained whether the message should be retained or not */ protected void setWill(String topic, MqttMessage msg, int qos, boolean retained) { willDestination = topic; willMessage = msg; willMessage.setQos(qos); willMessage.setRetained(retained); // Prevent any more changes to the will message willMessage.setMutable(false); }
/** * Sets up the will information, based on the supplied parameters. */ protected void setWill(String topic, MqttMessage msg, int qos, boolean retained) { willDestination = topic; willMessage = msg; willMessage.setQos(qos); willMessage.setRetained(retained); // Prevent any more changes to the will message willMessage.setMutable(false); }
/** * Sets up the will information, based on the supplied parameters. * * @param topic the topic to send the LWT message to * @param msg the {@link MqttMessage} to send * @param qos the QoS Level to send the message at * @param retained whether the message should be retained or not */ protected void setWill(String topic, MqttMessage msg, int qos, boolean retained) { willDestination = topic; willMessage = msg; willMessage.setQos(qos); willMessage.setRetained(retained); // Prevent any more changes to the will message willMessage.setMutable(false); }
/** * Sets up the will information, based on the supplied parameters. * * @param topic the topic to send the LWT message to * @param msg the {@link MqttMessage} to send * @param qos the QoS Level to send the message at * @param retained whether the message should be retained or not */ protected void setWill(String topic, MqttMessage msg, int qos, boolean retained) { willDestination = topic; willMessage = msg; willMessage.setQos(qos); willMessage.setRetained(retained); // Prevent any more changes to the will message willMessage.setMutable(false); }