/** * Returns a string representation of this topic. * @return a string representation of this topic. */ public String toString() { return getName(); }
/** * Create a PUBLISH packet from the specified message. */ private MqttPublish createPublish(MqttMessage message) { return new MqttPublish(this.getName(), message); }
/** * Sets the "Last Will and Testament" (LWT) for the connection. * In the event that this client unexpectedly loses its connection to the * server, the server will publish a message to itself using the supplied * details. * * @param topic the topic to publish to. * @param payload the byte payload for the message. * @param qos the quality of service to publish the message at (0, 1 or 2). * @param retained whether or not the message should be retained. */ public void setWill(MqttTopic topic, byte[] payload, int qos, boolean retained) { String topicS = topic.getName(); validateWill(topicS, payload); this.setWill(topicS, new MqttMessage(payload), qos, retained); }
/** * Returns a string representation of this topic. * @return a string representation of this topic. */ public String toString() { return getName(); }
/** * Returns a string representation of this topic. * @return a string representation of this topic. */ public String toString() { return getName(); }
/** * Returns a string representation of this topic. * @return a string representation of this topic. */ public String toString() { return getName(); }
/** * Create a PUBLISH packet from the specified message. */ private MqttPublish createPublish(MqttMessage message) { return new MqttPublish(this.getName(), message); }
/** * Create a PUBLISH packet from the specified message. */ private MqttPublish createPublish(MqttMessage message) { return new MqttPublish(this.getName(), message); }
/** * Create a PUBLISH packet from the specified message. */ private MqttPublish createPublish(MqttMessage message) { return new MqttPublish(this.getName(), message); }
/** * Sets the "Last Will and Testament" (LWT) for the connection. * In the event that this client unexpectedly loses its connection to the * server, the server will publish a message to itself using the supplied * details. * * @param topic the topic to publish to. * @param payload the byte payload for the message. * @param qos the quality of service to publish the message at (0, 1 or 2). * @param retained whether or not the message should be retained. */ public void setWill(MqttTopic topic, byte[] payload, int qos, boolean retained) { String topicS = topic.getName(); validateWill(topicS, payload); this.setWill(topicS, new MqttMessage(payload), qos, retained); }
/** * Sets the "Last Will and Testament" (LWT) for the connection. * In the event that this client unexpectedly loses its connection to the * server, the server will publish a message to itself using the supplied * details. * * @param topic the topic to publish to. * @param payload the byte payload for the message. * @param qos the quality of service to publish the message at (0, 1 or 2). * @param retained whether or not the message should be retained. */ public void setWill(MqttTopic topic, byte[] payload, int qos, boolean retained) { String topicS = topic.getName(); validateWill(topicS, payload); this.setWill(topicS, new MqttMessage(payload), qos, retained); }
/** * Sets the "Last Will and Testament" (LWT) for the connection. * In the event that this client unexpectedly loses its connection to the * server, the server will publish a message to itself using the supplied * details. * * @param topic the topic to publish to. * @param payload the byte payload for the message. * @param qos the quality of service to publish the message at (0, 1 or 2). * @param retained whether or not the message should be retained. */ public void setWill(MqttTopic topic, byte[] payload, int qos, boolean retained) { String topicS = topic.getName(); validateWill(topicS, payload); this.setWill(topicS, new MqttMessage(payload), qos, retained); }