/** * Whether or not the publish message should be retained by the messaging engine. * Sending a message with retained set to <code>true</code> and with an empty * byte array as the payload e.g. <code>new byte[0]</code> will clear the * retained message from the server. The default value is <code>false</code> * * @param retained whether or not the messaging engine should retain the message. * @throws IllegalStateException if this message cannot be edited */ public void setRetained(boolean retained) { checkMutable(); this.retained = retained; }
/** * Clears the payload, resetting it to be empty. * @throws IllegalStateException if this message cannot be edited */ public void clearPayload() { checkMutable(); this.payload = new byte[] {}; }
/** * Sets the payload of this message to be the specified byte array. * * @param payload the payload for this message. * @throws IllegalStateException if this message cannot be edited * @throws NullPointerException if no payload is provided */ public void setPayload(byte[] payload) { checkMutable(); if (payload == null) { throw new NullPointerException(); } this.payload = payload; }
checkMutable(); validateQos(qos); this.qos = qos;
/** * Clears the payload, resetting it to be empty. * @throws IllegalStateException if this message cannot be edited */ public void clearPayload() { checkMutable(); this.payload = new byte[] {}; }
/** * Clears the payload, resetting it to be empty. * @throws IllegalStateException if this message cannot be edited */ public void clearPayload() { checkMutable(); this.payload = new byte[] {}; }
/** * Clears the payload, resetting it to be empty. * @throws IllegalStateException if this message cannot be edited */ public void clearPayload() { checkMutable(); this.payload = new byte[] {}; }
/** * Whether or not the publish message should be retained by the messaging engine. * Sending a message with the retained set to <code>false</code> will clear the * retained message from the server. The default value is <code>false</code> * * @param retained whether or not the messaging engine should retain the message. * @throws IllegalStateException if this message cannot be edited */ public void setRetained(boolean retained) { checkMutable(); this.retained = retained; }
/** * Whether or not the publish message should be retained by the messaging engine. * Sending a message with retained set to <code>true</code> and with an empty * byte array as the payload e.g. <code>new byte[0]</code> will clear the * retained message from the server. The default value is <code>false</code> * * @param retained whether or not the messaging engine should retain the message. * @throws IllegalStateException if this message cannot be edited */ public void setRetained(boolean retained) { checkMutable(); this.retained = retained; }
/** * Whether or not the publish message should be retained by the messaging engine. * Sending a message with retained set to <code>true</code> and with an empty * byte array as the payload e.g. <code>new byte[0]</code> will clear the * retained message from the server. The default value is <code>false</code> * * @param retained whether or not the messaging engine should retain the message. * @throws IllegalStateException if this message cannot be edited */ public void setRetained(boolean retained) { checkMutable(); this.retained = retained; }
/** * Sets the payload of this message to be the specified byte array. * * @param payload the payload for this message. * @throws IllegalStateException if this message cannot be edited * @throws NullPointerException if no payload is provided */ public void setPayload(byte[] payload) { checkMutable(); if (payload == null) { throw new NullPointerException(); } this.payload = payload; }
/** * Sets the payload of this message to be the specified byte array. * * @param payload the payload for this message. * @throws IllegalStateException if this message cannot be edited * @throws NullPointerException if no payload is provided */ public void setPayload(byte[] payload) { checkMutable(); if (payload == null) { throw new NullPointerException(); } this.payload = payload; }
/** * Sets the payload of this message to be the specified byte array. * * @param payload the payload for this message. * @throws IllegalStateException if this message cannot be edited * @throws NullPointerException if no payload is provided */ public void setPayload(byte[] payload) { checkMutable(); if (payload == null) { throw new NullPointerException(); } this.payload = payload; }
checkMutable(); validateQos(qos); this.qos = qos;
checkMutable(); validateQos(qos); this.qos = qos;
checkMutable(); validateQos(qos); this.qos = qos;