public void setPassword(String password) { this.setPassword(utf8(password)); } public void setPassword(UTF8Buffer password) {
public void setUserName(String userName) { this.setUserName(utf8(userName)); } public void setUserName(UTF8Buffer userName) {
public void setWillTopic(String willTopic) { this.setWillTopic(utf8(willTopic)); } public void setWillTopic(UTF8Buffer willTopic) {
public void setClientId(String clientId) { this.setClientId(utf8(clientId)); } public void setClientId(UTF8Buffer clientId) {
public void setWillMessage(String willMessage) { connect.willMessage(utf8(willMessage)); } public void setWillMessage(UTF8Buffer willMessage) {
public void publish(final String topic, final byte[] payload, final QoS qos, final boolean retain) throws Exception { publish(utf8(topic), new Buffer(payload), qos, retain); }
public void publish(String topic, byte[] payload, QoS qos, boolean retain, Callback<Void> cb) { publish(utf8(topic), new Buffer(payload), qos, retain, cb); }
public Future<Void> publish(final String topic, final byte[] payload, final QoS qos, final boolean retain) { return publish(utf8(topic), new Buffer(payload), qos, retain); }
static protected UTF8Buffer readUTF(DataByteArrayInputStream is) throws ProtocolException { int size = is.readUnsignedShort(); Buffer buffer = is.readBuffer(size); if (buffer == null || buffer.length != size) { throw new ProtocolException("Invalid message encoding"); } return buffer.utf8(); }
id = id.substring(0,23); mqtt.connect.clientId(utf8(id));
public void setClientId(String clientId) { this.setClientId(utf8(clientId)); } public void setClientId(UTF8Buffer clientId) {
public void setWillMessage(String willMessage) { connect.willMessage(utf8(willMessage)); } public void setWillMessage(UTF8Buffer willMessage) {
public void set(Message message, Object value) throws OpenwireException { String rc = (String) TypeConversionSupport.convert(value, String.class); if (rc == null) { throw new OpenwireException("Property JMSCorrelationID cannot be set from a " + value.getClass().getName() + "."); } message.setCorrelationId(utf8(rc)); } });
public void set(Message message, Object value) throws OpenwireException { String rc = (String) TypeConversionSupport.convert(value, String.class); if (rc == null) { throw new OpenwireException("Property JMSXGroupID cannot be set from a " + value.getClass().getName() + "."); } message.setGroupID(utf8(rc)); } });
public void set(Message message, Object value) throws OpenwireException { String rc = (String) TypeConversionSupport.convert(value, String.class); if (rc == null) { throw new OpenwireException("Property JMSXGroupID cannot be set from a " + value.getClass().getName() + "."); } message.setGroupID(utf8(rc)); } });
public void set(Message message, Object value) throws OpenwireException { String rc = (String) TypeConversionSupport.convert(value, String.class); if (rc == null) { throw new OpenwireException("Property JMSType cannot be set from a " + value.getClass().getName() + "."); } message.setType(utf8(rc)); } });
public void set(Message message, Object value) throws OpenwireException { String rc = (String) TypeConversionSupport.convert(value, String.class); if (rc == null) { throw new OpenwireException("Property JMSCorrelationID cannot be set from a " + value.getClass().getName() + "."); } message.setCorrelationId(utf8(rc)); } });
@Override public CompletionStage<?> publishMqtt(final String topic, final ByteBuffer payload) { final CompletableFuture<Void> future = new CompletableFuture<>(); connection.publish(Buffer.utf8(topic), new Buffer(payload), QoS.AT_LEAST_ONCE, false, Callbacks.asCallback(future)); return future; }
static protected UTF8Buffer readUTF(DataByteArrayInputStream is) throws ProtocolException { int size = is.readUnsignedShort(); Buffer buffer = is.readBuffer(size); if (buffer == null || buffer.length != size) { throw new ProtocolException("Invalid message encoding"); } return buffer.utf8(); }
protected UTF8Buffer looseUnmarshalString(DataByteArrayInputStream dataIn) throws IOException { if (dataIn.readBoolean()) { int size = dataIn.readShort(); return dataIn.readBuffer(size).utf8(); } else { return null; } }