/*
 * Copyright 2014 Red Hat, Inc.
 *
 * Red Hat licenses this file to you under the Apache License, version 2.0
 * (the "License"); you may not use this file except in compliance with the
 * License.  You may obtain a copy of the License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */

package io.vertx.rxjava.ext.stomp;

import rx.Observable;
import rx.Single;
import io.vertx.rx.java.RxHelper;
import io.vertx.rx.java.WriteStreamSubscriber;
import io.vertx.rx.java.SingleOnSubscribeAdapter;
import java.util.Map;
import java.util.Set;
import java.util.List;
import java.util.Iterator;
import java.util.function.Function;
import java.util.stream.Collectors;
import io.vertx.core.Handler;
import io.vertx.core.AsyncResult;
import io.vertx.core.json.JsonObject;
import io.vertx.core.json.JsonArray;
import io.vertx.lang.rx.RxGen;
import io.vertx.lang.rx.TypeArg;
import io.vertx.lang.rx.MappingIterator;

Once a connection to the STOMP server has been made, client receives a StompClientConnection, that let send and receive STOMP frames.

NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
/** * Once a connection to the STOMP server has been made, client receives a {@link io.vertx.rxjava.ext.stomp.StompClientConnection}, that let * send and receive STOMP frames. * * <p/> * NOTE: This class has been automatically generated from the {@link io.vertx.ext.stomp.StompClientConnection original} non RX-ified interface using Vert.x codegen. */
@RxGen(io.vertx.ext.stomp.StompClientConnection.class) public class StompClientConnection { @Override public String toString() { return delegate.toString(); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; StompClientConnection that = (StompClientConnection) o; return delegate.equals(that.delegate); } @Override public int hashCode() { return delegate.hashCode(); } public static final TypeArg<StompClientConnection> __TYPE_ARG = new TypeArg<>( obj -> new StompClientConnection((io.vertx.ext.stomp.StompClientConnection) obj), StompClientConnection::getDelegate ); private final io.vertx.ext.stomp.StompClientConnection delegate; public StompClientConnection(io.vertx.ext.stomp.StompClientConnection delegate) { this.delegate = delegate; } public StompClientConnection(Object delegate) { this.delegate = (io.vertx.ext.stomp.StompClientConnection)delegate; } public io.vertx.ext.stomp.StompClientConnection getDelegate() { return delegate; }
Returns:the session id.
/** * @return the session id. */
public String session() { String ret = delegate.session(); return ret; }
Returns:the STOMP protocol version negotiated with the server.
/** * @return the STOMP protocol version negotiated with the server. */
public String version() { String ret = delegate.version(); return ret; }
Closes the connection without sending the DISCONNECT frame.
/** * Closes the connection without sending the <code>DISCONNECT</code> frame. */
public void close() { delegate.close(); }
Returns:the server name.
/** * @return the server name. */
public String server() { String ret = delegate.server(); return ret; }
Sends a SEND frame to the server.
Params:
  • headers – the headers, must not be null
  • body – the body, may be null
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the sent frame has been received. The handler receives the sent frame.
Returns:the current StompClientConnection
/** * Sends a <code>SEND</code> frame to the server. * @param headers the headers, must not be <code>null</code> * @param body the body, may be <code>null</code> * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the sent frame has been received. The handler receives the sent frame. * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection send(java.util.Map<String, String> headers, io.vertx.rxjava.core.buffer.Buffer body, Handler<AsyncResult<io.vertx.ext.stomp.Frame>> receiptHandler) { delegate.send(headers, body.getDelegate(), receiptHandler); return this; }
Sends a SEND frame to the server.
Params:
  • headers – the headers, must not be null
  • body – the body, may be null
Returns:the current StompClientConnection
/** * Sends a <code>SEND</code> frame to the server. * @param headers the headers, must not be <code>null</code> * @param body the body, may be <code>null</code> * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection send(java.util.Map<String, String> headers, io.vertx.rxjava.core.buffer.Buffer body) { return send(headers, body, ar -> { }); }
Sends a SEND frame to the server.
Params:
  • headers – the headers, must not be null
  • body – the body, may be null
Returns:the current StompClientConnection
/** * Sends a <code>SEND</code> frame to the server. * @param headers the headers, must not be <code>null</code> * @param body the body, may be <code>null</code> * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public Single<io.vertx.ext.stomp.Frame> rxSend(java.util.Map<String, String> headers, io.vertx.rxjava.core.buffer.Buffer body) { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { send(headers, body, fut); })); }
Sends a SEND frame to the server to the given destination. The message does not have any other header.
Params:
  • destination – the destination, must not be null
  • body – the body, may be null
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the sent frame has been received. The handler receives the sent frame.
Returns:the current StompClientConnection
/** * Sends a <code>SEND</code> frame to the server to the given destination. The message does not have any other header. * @param destination the destination, must not be <code>null</code> * @param body the body, may be <code>null</code> * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the sent frame has been received. The handler receives the sent frame. * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection send(String destination, io.vertx.rxjava.core.buffer.Buffer body, Handler<AsyncResult<io.vertx.ext.stomp.Frame>> receiptHandler) { delegate.send(destination, body.getDelegate(), receiptHandler); return this; }
Sends a SEND frame to the server to the given destination. The message does not have any other header.
Params:
  • destination – the destination, must not be null
  • body – the body, may be null
Returns:the current StompClientConnection
/** * Sends a <code>SEND</code> frame to the server to the given destination. The message does not have any other header. * @param destination the destination, must not be <code>null</code> * @param body the body, may be <code>null</code> * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection send(String destination, io.vertx.rxjava.core.buffer.Buffer body) { return send(destination, body, ar -> { }); }
Sends a SEND frame to the server to the given destination. The message does not have any other header.
Params:
  • destination – the destination, must not be null
  • body – the body, may be null
Returns:the current StompClientConnection
/** * Sends a <code>SEND</code> frame to the server to the given destination. The message does not have any other header. * @param destination the destination, must not be <code>null</code> * @param body the body, may be <code>null</code> * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public Single<io.vertx.ext.stomp.Frame> rxSend(String destination, io.vertx.rxjava.core.buffer.Buffer body) { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { send(destination, body, fut); })); }
Sends the given frame to the server.
Params:
  • frame – the frame
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the sent frame has been received. The handler receives the sent frame.
Returns:the current StompClientConnection
/** * Sends the given frame to the server. * @param frame the frame * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the sent frame has been received. The handler receives the sent frame. * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection send(io.vertx.ext.stomp.Frame frame, Handler<AsyncResult<io.vertx.ext.stomp.Frame>> receiptHandler) { delegate.send(frame, receiptHandler); return this; }
Sends the given frame to the server.
Params:
  • frame – the frame
Returns:the current StompClientConnection
/** * Sends the given frame to the server. * @param frame the frame * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection send(io.vertx.ext.stomp.Frame frame) { return send(frame, ar -> { }); }
Sends the given frame to the server.
Params:
  • frame – the frame
Returns:the current StompClientConnection
/** * Sends the given frame to the server. * @param frame the frame * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public Single<io.vertx.ext.stomp.Frame> rxSend(io.vertx.ext.stomp.Frame frame) { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { send(frame, fut); })); }
Sends a SEND frame to the server to the given destination.
Params:
  • destination – the destination, must not be null
  • headers – the header. The destination header is replaced by the value given to the destination parameter
  • body – the body, may be null
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the sent frame has been received. The handler receives the sent frame.
Returns:the current StompClientConnection
/** * Sends a <code>SEND</code> frame to the server to the given destination. * @param destination the destination, must not be <code>null</code> * @param headers the header. The <code>destination</code> header is replaced by the value given to the <code>destination</code> parameter * @param body the body, may be <code>null</code> * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the sent frame has been received. The handler receives the sent frame. * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection send(String destination, java.util.Map<String, String> headers, io.vertx.rxjava.core.buffer.Buffer body, Handler<AsyncResult<io.vertx.ext.stomp.Frame>> receiptHandler) { delegate.send(destination, headers, body.getDelegate(), receiptHandler); return this; }
Sends a SEND frame to the server to the given destination.
Params:
  • destination – the destination, must not be null
  • headers – the header. The destination header is replaced by the value given to the destination parameter
  • body – the body, may be null
Returns:the current StompClientConnection
/** * Sends a <code>SEND</code> frame to the server to the given destination. * @param destination the destination, must not be <code>null</code> * @param headers the header. The <code>destination</code> header is replaced by the value given to the <code>destination</code> parameter * @param body the body, may be <code>null</code> * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection send(String destination, java.util.Map<String, String> headers, io.vertx.rxjava.core.buffer.Buffer body) { return send(destination, headers, body, ar -> { }); }
Sends a SEND frame to the server to the given destination.
Params:
  • destination – the destination, must not be null
  • headers – the header. The destination header is replaced by the value given to the destination parameter
  • body – the body, may be null
Returns:the current StompClientConnection
/** * Sends a <code>SEND</code> frame to the server to the given destination. * @param destination the destination, must not be <code>null</code> * @param headers the header. The <code>destination</code> header is replaced by the value given to the <code>destination</code> parameter * @param body the body, may be <code>null</code> * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public Single<io.vertx.ext.stomp.Frame> rxSend(String destination, java.util.Map<String, String> headers, io.vertx.rxjava.core.buffer.Buffer body) { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { send(destination, headers, body, fut); })); }
Subscribes to the given destination. This destination is used as subscription id.
Params:
  • destination – the destination, must not be null
  • handler – the handler invoked when a message is received on the given destination. Must not be null.
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the subscription has been received. The handler receives the subscription id.
Returns:the current StompClientConnection
/** * Subscribes to the given destination. This destination is used as subscription id. * @param destination the destination, must not be <code>null</code> * @param handler the handler invoked when a message is received on the given destination. Must not be <code>null</code>. * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the subscription has been received. The handler receives the subscription id. * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection subscribe(String destination, Handler<io.vertx.ext.stomp.Frame> handler, Handler<AsyncResult<String>> receiptHandler) { delegate.subscribe(destination, handler, receiptHandler); return this; }
Subscribes to the given destination. This destination is used as subscription id.
Params:
  • destination – the destination, must not be null
  • handler – the handler invoked when a message is received on the given destination. Must not be null.
Returns:the current StompClientConnection
/** * Subscribes to the given destination. This destination is used as subscription id. * @param destination the destination, must not be <code>null</code> * @param handler the handler invoked when a message is received on the given destination. Must not be <code>null</code>. * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection subscribe(String destination, Handler<io.vertx.ext.stomp.Frame> handler) { return subscribe(destination, handler, ar -> { }); }
Subscribes to the given destination. This destination is used as subscription id.
Params:
  • destination – the destination, must not be null
  • handler – the handler invoked when a message is received on the given destination. Must not be null.
Returns:the current StompClientConnection
/** * Subscribes to the given destination. This destination is used as subscription id. * @param destination the destination, must not be <code>null</code> * @param handler the handler invoked when a message is received on the given destination. Must not be <code>null</code>. * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public Single<String> rxSubscribe(String destination, Handler<io.vertx.ext.stomp.Frame> handler) { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { subscribe(destination, handler, fut); })); }
Subscribes to the given destination.
Params:
  • destination – the destination, must not be null
  • headers – the headers to configure the subscription. It may contain the ack header to configure the acknowledgment policy. If the given set of headers contains the id header, this value is used as subscription id.
  • handler – the handler invoked when a message is received on the given destination. Must not be null.
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the subscription has been received. The handler receives the subscription id.
Returns:the current StompClientConnection
/** * Subscribes to the given destination. * @param destination the destination, must not be <code>null</code> * @param headers the headers to configure the subscription. It may contain the <code>ack</code> header to configure the acknowledgment policy. If the given set of headers contains the <code>id</code> header, this value is used as subscription id. * @param handler the handler invoked when a message is received on the given destination. Must not be <code>null</code>. * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the subscription has been received. The handler receives the subscription id. * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection subscribe(String destination, java.util.Map<String, String> headers, Handler<io.vertx.ext.stomp.Frame> handler, Handler<AsyncResult<String>> receiptHandler) { delegate.subscribe(destination, headers, handler, receiptHandler); return this; }
Subscribes to the given destination.
Params:
  • destination – the destination, must not be null
  • headers – the headers to configure the subscription. It may contain the ack header to configure the acknowledgment policy. If the given set of headers contains the id header, this value is used as subscription id.
  • handler – the handler invoked when a message is received on the given destination. Must not be null.
Returns:the current StompClientConnection
/** * Subscribes to the given destination. * @param destination the destination, must not be <code>null</code> * @param headers the headers to configure the subscription. It may contain the <code>ack</code> header to configure the acknowledgment policy. If the given set of headers contains the <code>id</code> header, this value is used as subscription id. * @param handler the handler invoked when a message is received on the given destination. Must not be <code>null</code>. * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection subscribe(String destination, java.util.Map<String, String> headers, Handler<io.vertx.ext.stomp.Frame> handler) { return subscribe(destination, headers, handler, ar -> { }); }
Subscribes to the given destination.
Params:
  • destination – the destination, must not be null
  • headers – the headers to configure the subscription. It may contain the ack header to configure the acknowledgment policy. If the given set of headers contains the id header, this value is used as subscription id.
  • handler – the handler invoked when a message is received on the given destination. Must not be null.
Returns:the current StompClientConnection
/** * Subscribes to the given destination. * @param destination the destination, must not be <code>null</code> * @param headers the headers to configure the subscription. It may contain the <code>ack</code> header to configure the acknowledgment policy. If the given set of headers contains the <code>id</code> header, this value is used as subscription id. * @param handler the handler invoked when a message is received on the given destination. Must not be <code>null</code>. * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public Single<String> rxSubscribe(String destination, java.util.Map<String, String> headers, Handler<io.vertx.ext.stomp.Frame> handler) { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { subscribe(destination, headers, handler, fut); })); }
Un-subscribes from the given destination. This method only works if the subscription did not specifies a subscription id (using the id header).
Params:
  • destination – the destination
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the un-subscription has been received. The handler receives the sent frame (UNSUBSCRIBE).
Returns:the current StompClientConnection
/** * Un-subscribes from the given destination. This method only works if the subscription did not specifies a * subscription id (using the <code>id</code> header). * @param destination the destination * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the un-subscription has been received. The handler receives the sent frame (<code>UNSUBSCRIBE</code>). * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection unsubscribe(String destination, Handler<AsyncResult<io.vertx.ext.stomp.Frame>> receiptHandler) { delegate.unsubscribe(destination, receiptHandler); return this; }
Un-subscribes from the given destination. This method only works if the subscription did not specifies a subscription id (using the id header).
Params:
  • destination – the destination
Returns:the current StompClientConnection
/** * Un-subscribes from the given destination. This method only works if the subscription did not specifies a * subscription id (using the <code>id</code> header). * @param destination the destination * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection unsubscribe(String destination) { return unsubscribe(destination, ar -> { }); }
Un-subscribes from the given destination. This method only works if the subscription did not specifies a subscription id (using the id header).
Params:
  • destination – the destination
Returns:the current StompClientConnection
/** * Un-subscribes from the given destination. This method only works if the subscription did not specifies a * subscription id (using the <code>id</code> header). * @param destination the destination * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public Single<io.vertx.ext.stomp.Frame> rxUnsubscribe(String destination) { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { unsubscribe(destination, fut); })); }
Un-subscribes from the given destination. This method computes the subscription id as follows. If the given headers contains the id header, the header value is used. Otherwise the destination is used.
Params:
  • destination – the destination
  • headers – the headers
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the un-subscription has been received. The handler receives the sent frame (UNSUBSCRIBE).
Returns:the current StompClientConnection
/** * Un-subscribes from the given destination. This method computes the subscription id as follows. If the given * headers contains the <code>id</code> header, the header value is used. Otherwise the destination is used. * @param destination the destination * @param headers the headers * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the un-subscription has been received. The handler receives the sent frame (<code>UNSUBSCRIBE</code>). * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection unsubscribe(String destination, java.util.Map<String, String> headers, Handler<AsyncResult<io.vertx.ext.stomp.Frame>> receiptHandler) { delegate.unsubscribe(destination, headers, receiptHandler); return this; }
Un-subscribes from the given destination. This method computes the subscription id as follows. If the given headers contains the id header, the header value is used. Otherwise the destination is used.
Params:
  • destination – the destination
  • headers – the headers
Returns:the current StompClientConnection
/** * Un-subscribes from the given destination. This method computes the subscription id as follows. If the given * headers contains the <code>id</code> header, the header value is used. Otherwise the destination is used. * @param destination the destination * @param headers the headers * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection unsubscribe(String destination, java.util.Map<String, String> headers) { return unsubscribe(destination, headers, ar -> { }); }
Un-subscribes from the given destination. This method computes the subscription id as follows. If the given headers contains the id header, the header value is used. Otherwise the destination is used.
Params:
  • destination – the destination
  • headers – the headers
Returns:the current StompClientConnection
/** * Un-subscribes from the given destination. This method computes the subscription id as follows. If the given * headers contains the <code>id</code> header, the header value is used. Otherwise the destination is used. * @param destination the destination * @param headers the headers * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public Single<io.vertx.ext.stomp.Frame> rxUnsubscribe(String destination, java.util.Map<String, String> headers) { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { unsubscribe(destination, headers, fut); })); }
Sets a handler notified when an ERROR frame is received by the client. The handler receives the ERROR frame and a reference on the StompClientConnection.
Params:
  • handler – the handler
Returns:the current StompClientConnection
/** * Sets a handler notified when an <code>ERROR</code> frame is received by the client. The handler receives the <code>ERROR</code> frame and a reference on the {@link io.vertx.rxjava.ext.stomp.StompClientConnection}. * @param handler the handler * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection errorHandler(Handler<io.vertx.ext.stomp.Frame> handler) { io.vertx.rxjava.ext.stomp.StompClientConnection ret = io.vertx.rxjava.ext.stomp.StompClientConnection.newInstance((io.vertx.ext.stomp.StompClientConnection)delegate.errorHandler(handler)); return ret; }
Sets a handler notified when the STOMP connection is closed.
Params:
  • handler – the handler
Returns:the current StompClientConnection
/** * Sets a handler notified when the STOMP connection is closed. * @param handler the handler * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection closeHandler(Handler<io.vertx.rxjava.ext.stomp.StompClientConnection> handler) { delegate.closeHandler(new Handler<io.vertx.ext.stomp.StompClientConnection>() { public void handle(io.vertx.ext.stomp.StompClientConnection event) { handler.handle(io.vertx.rxjava.ext.stomp.StompClientConnection.newInstance((io.vertx.ext.stomp.StompClientConnection)event)); } }); return this; }
Sets a handler notified when the server does not respond to a ping request in time. In other words, this handler is invoked when the heartbeat has detected a connection failure with the server. The handler can decide to reconnect to the server.
Params:
  • handler – the handler
Returns:the current StompClientConnection receiving the dropped connection.
/** * Sets a handler notified when the server does not respond to a <code>ping</code> request in time. In other * words, this handler is invoked when the heartbeat has detected a connection failure with the server. * The handler can decide to reconnect to the server. * @param handler the handler * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} receiving the dropped connection. */
public io.vertx.rxjava.ext.stomp.StompClientConnection connectionDroppedHandler(Handler<io.vertx.rxjava.ext.stomp.StompClientConnection> handler) { delegate.connectionDroppedHandler(new Handler<io.vertx.ext.stomp.StompClientConnection>() { public void handle(io.vertx.ext.stomp.StompClientConnection event) { handler.handle(io.vertx.rxjava.ext.stomp.StompClientConnection.newInstance((io.vertx.ext.stomp.StompClientConnection)event)); } }); return this; }
Sets a handler that let customize the behavior when a ping needs to be sent to the server. Be aware that changing the default behavior may break the compliance with the STOMP specification.
Params:
  • handler – the handler
Returns:the current StompClientConnection
/** * Sets a handler that let customize the behavior when a ping needs to be sent to the server. Be aware that * changing the default behavior may break the compliance with the STOMP specification. * @param handler the handler * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection pingHandler(Handler<io.vertx.rxjava.ext.stomp.StompClientConnection> handler) { delegate.pingHandler(new Handler<io.vertx.ext.stomp.StompClientConnection>() { public void handle(io.vertx.ext.stomp.StompClientConnection event) { handler.handle(io.vertx.rxjava.ext.stomp.StompClientConnection.newInstance((io.vertx.ext.stomp.StompClientConnection)event)); } }); return this; }
Begins a transaction.
Params:
  • id – the transaction id, must not be null
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the transaction begin has been processed by the server. The handler receives the sent frame (BEGIN).
Returns:the current StompClientConnection
/** * Begins a transaction. * @param id the transaction id, must not be <code>null</code> * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the transaction begin has been processed by the server. The handler receives the sent frame (<code>BEGIN</code>). * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection beginTX(String id, Handler<AsyncResult<io.vertx.ext.stomp.Frame>> receiptHandler) { delegate.beginTX(id, receiptHandler); return this; }
Begins a transaction.
Params:
  • id – the transaction id, must not be null
Returns:the current StompClientConnection
/** * Begins a transaction. * @param id the transaction id, must not be <code>null</code> * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection beginTX(String id) { return beginTX(id, ar -> { }); }
Begins a transaction.
Params:
  • id – the transaction id, must not be null
Returns:the current StompClientConnection
/** * Begins a transaction. * @param id the transaction id, must not be <code>null</code> * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public Single<io.vertx.ext.stomp.Frame> rxBeginTX(String id) { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { beginTX(id, fut); })); }
Begins a transaction.
Params:
  • id – the transaction id, must not be null
  • headers – additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameter
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the transaction begin has been processed by the server. The handler receives the sent frame (BEGIN).
Returns:the current StompClientConnection
/** * Begins a transaction. * @param id the transaction id, must not be <code>null</code> * @param headers additional headers to send to the server. The <code>transaction</code> header is replaced by the value passed in the @{code id} parameter * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the transaction begin has been processed by the server. The handler receives the sent frame (<code>BEGIN</code>). * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection beginTX(String id, java.util.Map<String, String> headers, Handler<AsyncResult<io.vertx.ext.stomp.Frame>> receiptHandler) { delegate.beginTX(id, headers, receiptHandler); return this; }
Begins a transaction.
Params:
  • id – the transaction id, must not be null
  • headers – additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameter
Returns:the current StompClientConnection
/** * Begins a transaction. * @param id the transaction id, must not be <code>null</code> * @param headers additional headers to send to the server. The <code>transaction</code> header is replaced by the value passed in the @{code id} parameter * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection beginTX(String id, java.util.Map<String, String> headers) { return beginTX(id, headers, ar -> { }); }
Begins a transaction.
Params:
  • id – the transaction id, must not be null
  • headers – additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameter
Returns:the current StompClientConnection
/** * Begins a transaction. * @param id the transaction id, must not be <code>null</code> * @param headers additional headers to send to the server. The <code>transaction</code> header is replaced by the value passed in the @{code id} parameter * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public Single<io.vertx.ext.stomp.Frame> rxBeginTX(String id, java.util.Map<String, String> headers) { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { beginTX(id, headers, fut); })); }
Commits a transaction.
Params:
  • id – the transaction id, must not be null
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the transaction commit has been processed by the server. The handler receives the sent frame (COMMIT).
Returns:the current StompClientConnection
/** * Commits a transaction. * @param id the transaction id, must not be <code>null</code> * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the transaction commit has been processed by the server. The handler receives the sent frame (<code>COMMIT</code>). * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection commit(String id, Handler<AsyncResult<io.vertx.ext.stomp.Frame>> receiptHandler) { delegate.commit(id, receiptHandler); return this; }
Commits a transaction.
Params:
  • id – the transaction id, must not be null
Returns:the current StompClientConnection
/** * Commits a transaction. * @param id the transaction id, must not be <code>null</code> * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection commit(String id) { return commit(id, ar -> { }); }
Commits a transaction.
Params:
  • id – the transaction id, must not be null
Returns:the current StompClientConnection
/** * Commits a transaction. * @param id the transaction id, must not be <code>null</code> * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public Single<io.vertx.ext.stomp.Frame> rxCommit(String id) { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { commit(id, fut); })); }
Commits a transaction.
Params:
  • id – the transaction id, must not be null
  • headers – additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameter
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the transaction commit has been processed by the server. The handler receives the sent frame (COMMIT).
Returns:the current StompClientConnection
/** * Commits a transaction. * @param id the transaction id, must not be <code>null</code> * @param headers additional headers to send to the server. The <code>transaction</code> header is replaced by the value passed in the @{code id} parameter * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the transaction commit has been processed by the server. The handler receives the sent frame (<code>COMMIT</code>). * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection commit(String id, java.util.Map<String, String> headers, Handler<AsyncResult<io.vertx.ext.stomp.Frame>> receiptHandler) { delegate.commit(id, headers, receiptHandler); return this; }
Commits a transaction.
Params:
  • id – the transaction id, must not be null
  • headers – additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameter
Returns:the current StompClientConnection
/** * Commits a transaction. * @param id the transaction id, must not be <code>null</code> * @param headers additional headers to send to the server. The <code>transaction</code> header is replaced by the value passed in the @{code id} parameter * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection commit(String id, java.util.Map<String, String> headers) { return commit(id, headers, ar -> { }); }
Commits a transaction.
Params:
  • id – the transaction id, must not be null
  • headers – additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameter
Returns:the current StompClientConnection
/** * Commits a transaction. * @param id the transaction id, must not be <code>null</code> * @param headers additional headers to send to the server. The <code>transaction</code> header is replaced by the value passed in the @{code id} parameter * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public Single<io.vertx.ext.stomp.Frame> rxCommit(String id, java.util.Map<String, String> headers) { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { commit(id, headers, fut); })); }
Aborts a transaction.
Params:
  • id – the transaction id, must not be null
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the transaction cancellation has been processed by the server. The handler receives the sent frame (ABORT).
Returns:the current StompClientConnection
/** * Aborts a transaction. * @param id the transaction id, must not be <code>null</code> * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the transaction cancellation has been processed by the server. The handler receives the sent frame (<code>ABORT</code>). * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection abort(String id, Handler<AsyncResult<io.vertx.ext.stomp.Frame>> receiptHandler) { delegate.abort(id, receiptHandler); return this; }
Aborts a transaction.
Params:
  • id – the transaction id, must not be null
Returns:the current StompClientConnection
/** * Aborts a transaction. * @param id the transaction id, must not be <code>null</code> * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection abort(String id) { return abort(id, ar -> { }); }
Aborts a transaction.
Params:
  • id – the transaction id, must not be null
Returns:the current StompClientConnection
/** * Aborts a transaction. * @param id the transaction id, must not be <code>null</code> * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public Single<io.vertx.ext.stomp.Frame> rxAbort(String id) { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { abort(id, fut); })); }
Aborts a transaction.
Params:
  • id – the transaction id, must not be null
  • headers – additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameter
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the transaction cancellation has been processed by the server. The handler receives the sent frame (ABORT).
Returns:the current StompClientConnection
/** * Aborts a transaction. * @param id the transaction id, must not be <code>null</code> * @param headers additional headers to send to the server. The <code>transaction</code> header is replaced by the value passed in the @{code id} parameter * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the transaction cancellation has been processed by the server. The handler receives the sent frame (<code>ABORT</code>). * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection abort(String id, java.util.Map<String, String> headers, Handler<AsyncResult<io.vertx.ext.stomp.Frame>> receiptHandler) { delegate.abort(id, headers, receiptHandler); return this; }
Aborts a transaction.
Params:
  • id – the transaction id, must not be null
  • headers – additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameter
Returns:the current StompClientConnection
/** * Aborts a transaction. * @param id the transaction id, must not be <code>null</code> * @param headers additional headers to send to the server. The <code>transaction</code> header is replaced by the value passed in the @{code id} parameter * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection abort(String id, java.util.Map<String, String> headers) { return abort(id, headers, ar -> { }); }
Aborts a transaction.
Params:
  • id – the transaction id, must not be null
  • headers – additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameter
Returns:the current StompClientConnection
/** * Aborts a transaction. * @param id the transaction id, must not be <code>null</code> * @param headers additional headers to send to the server. The <code>transaction</code> header is replaced by the value passed in the @{code id} parameter * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public Single<io.vertx.ext.stomp.Frame> rxAbort(String id, java.util.Map<String, String> headers) { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { abort(id, headers, fut); })); }
Disconnects the client. Unlike the close method, this method send the DISCONNECT frame to the server.
Params:
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the disconnection has been processed by the server. The handler receives the sent frame (DISCONNECT).
Returns:the current StompClientConnection
/** * Disconnects the client. Unlike the {@link io.vertx.rxjava.ext.stomp.StompClientConnection#close} method, this method send the <code>DISCONNECT</code> frame to the * server. * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the disconnection has been processed by the server. The handler receives the sent frame (<code>DISCONNECT</code>). * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection disconnect(Handler<AsyncResult<io.vertx.ext.stomp.Frame>> receiptHandler) { delegate.disconnect(receiptHandler); return this; }
Disconnects the client. Unlike the close method, this method send the DISCONNECT frame to the server.
Returns:the current StompClientConnection
/** * Disconnects the client. Unlike the {@link io.vertx.rxjava.ext.stomp.StompClientConnection#close} method, this method send the <code>DISCONNECT</code> frame to the * server. * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection disconnect() { return disconnect(ar -> { }); }
Disconnects the client. Unlike the close method, this method send the DISCONNECT frame to the server.
Returns:the current StompClientConnection
/** * Disconnects the client. Unlike the {@link io.vertx.rxjava.ext.stomp.StompClientConnection#close} method, this method send the <code>DISCONNECT</code> frame to the * server. * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public Single<io.vertx.ext.stomp.Frame> rxDisconnect() { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { disconnect(fut); })); }
Disconnects the client. Unlike the close method, this method send the DISCONNECT frame to the server. This method lets you customize the DISCONNECT frame.
Params:
  • frame – the DISCONNECT frame.
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the disconnection has been processed by the server. The handler receives the sent frame (DISCONNECT).
Returns:a future resolved with the sent frame when the RECEIPT frame associated with the sent frame has been received
/** * Disconnects the client. Unlike the {@link io.vertx.rxjava.ext.stomp.StompClientConnection#close} method, this method send the <code>DISCONNECT</code> frame to the * server. This method lets you customize the <code>DISCONNECT</code> frame. * @param frame the <code>DISCONNECT</code> frame. * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the disconnection has been processed by the server. The handler receives the sent frame (<code>DISCONNECT</code>). * @return a future resolved with the sent frame when the <code>RECEIPT</code> frame associated with the sent frame has been received */
public io.vertx.rxjava.ext.stomp.StompClientConnection disconnect(io.vertx.ext.stomp.Frame frame, Handler<AsyncResult<io.vertx.ext.stomp.Frame>> receiptHandler) { delegate.disconnect(frame, receiptHandler); return this; }
Disconnects the client. Unlike the close method, this method send the DISCONNECT frame to the server. This method lets you customize the DISCONNECT frame.
Params:
  • frame – the DISCONNECT frame.
Returns:a future resolved with the sent frame when the RECEIPT frame associated with the sent frame has been received
/** * Disconnects the client. Unlike the {@link io.vertx.rxjava.ext.stomp.StompClientConnection#close} method, this method send the <code>DISCONNECT</code> frame to the * server. This method lets you customize the <code>DISCONNECT</code> frame. * @param frame the <code>DISCONNECT</code> frame. * @return a future resolved with the sent frame when the <code>RECEIPT</code> frame associated with the sent frame has been received */
public io.vertx.rxjava.ext.stomp.StompClientConnection disconnect(io.vertx.ext.stomp.Frame frame) { return disconnect(frame, ar -> { }); }
Disconnects the client. Unlike the close method, this method send the DISCONNECT frame to the server. This method lets you customize the DISCONNECT frame.
Params:
  • frame – the DISCONNECT frame.
Returns:a future resolved with the sent frame when the RECEIPT frame associated with the sent frame has been received
/** * Disconnects the client. Unlike the {@link io.vertx.rxjava.ext.stomp.StompClientConnection#close} method, this method send the <code>DISCONNECT</code> frame to the * server. This method lets you customize the <code>DISCONNECT</code> frame. * @param frame the <code>DISCONNECT</code> frame. * @return a future resolved with the sent frame when the <code>RECEIPT</code> frame associated with the sent frame has been received */
public Single<io.vertx.ext.stomp.Frame> rxDisconnect(io.vertx.ext.stomp.Frame frame) { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { disconnect(frame, fut); })); }
Sends an acknowledgement for a specific message. It means that the message has been handled and processed by the client. The id parameter is the message id received in the frame.
Params:
  • id – the message id of the message to acknowledge
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the acknowledgment has been processed by the server. The handler receives the sent frame (ACK).
Returns:the current StompClientConnection
/** * Sends an acknowledgement for a specific message. It means that the message has been handled and processed by the * client. The <code>id</code> parameter is the message id received in the frame. * @param id the message id of the message to acknowledge * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the acknowledgment has been processed by the server. The handler receives the sent frame (<code>ACK</code>). * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection ack(String id, Handler<AsyncResult<io.vertx.ext.stomp.Frame>> receiptHandler) { delegate.ack(id, receiptHandler); return this; }
Sends an acknowledgement for a specific message. It means that the message has been handled and processed by the client. The id parameter is the message id received in the frame.
Params:
  • id – the message id of the message to acknowledge
Returns:the current StompClientConnection
/** * Sends an acknowledgement for a specific message. It means that the message has been handled and processed by the * client. The <code>id</code> parameter is the message id received in the frame. * @param id the message id of the message to acknowledge * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection ack(String id) { return ack(id, ar -> { }); }
Sends an acknowledgement for a specific message. It means that the message has been handled and processed by the client. The id parameter is the message id received in the frame.
Params:
  • id – the message id of the message to acknowledge
Returns:the current StompClientConnection
/** * Sends an acknowledgement for a specific message. It means that the message has been handled and processed by the * client. The <code>id</code> parameter is the message id received in the frame. * @param id the message id of the message to acknowledge * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public Single<io.vertx.ext.stomp.Frame> rxAck(String id) { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { ack(id, fut); })); }
Sends a non-acknowledgement for the given message. It means that the message has not been handled by the client. The id parameter is the message id received in the frame.
Params:
  • id – the message id of the message to acknowledge
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the non-acknowledgment has been processed by the server. The handler receives the sent frame (NACK).
Returns:the current StompClientConnection
/** * Sends a non-acknowledgement for the given message. It means that the message has not been handled by the client. * The <code>id</code> parameter is the message id received in the frame. * @param id the message id of the message to acknowledge * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the non-acknowledgment has been processed by the server. The handler receives the sent frame (<code>NACK</code>). * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection nack(String id, Handler<AsyncResult<io.vertx.ext.stomp.Frame>> receiptHandler) { delegate.nack(id, receiptHandler); return this; }
Sends a non-acknowledgement for the given message. It means that the message has not been handled by the client. The id parameter is the message id received in the frame.
Params:
  • id – the message id of the message to acknowledge
Returns:the current StompClientConnection
/** * Sends a non-acknowledgement for the given message. It means that the message has not been handled by the client. * The <code>id</code> parameter is the message id received in the frame. * @param id the message id of the message to acknowledge * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection nack(String id) { return nack(id, ar -> { }); }
Sends a non-acknowledgement for the given message. It means that the message has not been handled by the client. The id parameter is the message id received in the frame.
Params:
  • id – the message id of the message to acknowledge
Returns:the current StompClientConnection
/** * Sends a non-acknowledgement for the given message. It means that the message has not been handled by the client. * The <code>id</code> parameter is the message id received in the frame. * @param id the message id of the message to acknowledge * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public Single<io.vertx.ext.stomp.Frame> rxNack(String id) { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { nack(id, fut); })); }
Sends an acknowledgement for the given frame. It means that the frame has been handled and processed by the client. The sent acknowledgement is part of the transaction identified by the given id.
Params:
  • id – the message id of the message to acknowledge
  • txId – the transaction id
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the acknowledgment has been processed by the server. The handler receives the sent frame (ACK).
Returns:the current StompClientConnection
/** * Sends an acknowledgement for the given frame. It means that the frame has been handled and processed by the * client. The sent acknowledgement is part of the transaction identified by the given id. * @param id the message id of the message to acknowledge * @param txId the transaction id * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the acknowledgment has been processed by the server. The handler receives the sent frame (<code>ACK</code>). * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection ack(String id, String txId, Handler<AsyncResult<io.vertx.ext.stomp.Frame>> receiptHandler) { delegate.ack(id, txId, receiptHandler); return this; }
Sends an acknowledgement for the given frame. It means that the frame has been handled and processed by the client. The sent acknowledgement is part of the transaction identified by the given id.
Params:
  • id – the message id of the message to acknowledge
  • txId – the transaction id
Returns:the current StompClientConnection
/** * Sends an acknowledgement for the given frame. It means that the frame has been handled and processed by the * client. The sent acknowledgement is part of the transaction identified by the given id. * @param id the message id of the message to acknowledge * @param txId the transaction id * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection ack(String id, String txId) { return ack(id, txId, ar -> { }); }
Sends an acknowledgement for the given frame. It means that the frame has been handled and processed by the client. The sent acknowledgement is part of the transaction identified by the given id.
Params:
  • id – the message id of the message to acknowledge
  • txId – the transaction id
Returns:the current StompClientConnection
/** * Sends an acknowledgement for the given frame. It means that the frame has been handled and processed by the * client. The sent acknowledgement is part of the transaction identified by the given id. * @param id the message id of the message to acknowledge * @param txId the transaction id * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public Single<io.vertx.ext.stomp.Frame> rxAck(String id, String txId) { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { ack(id, txId, fut); })); }
Sends a non-acknowledgement for the given frame. It means that the frame has not been handled by the client. The sent non-acknowledgement is part of the transaction identified by the given id.
Params:
  • id – the message id of the message to acknowledge
  • txId – the transaction id
  • receiptHandler – the handler invoked when the RECEIPT frame associated with the non-acknowledgment has been processed by the server. The handler receives the sent frame (NACK).
Returns:the current StompClientConnection
/** * Sends a non-acknowledgement for the given frame. It means that the frame has not been handled by the client. * The sent non-acknowledgement is part of the transaction identified by the given id. * @param id the message id of the message to acknowledge * @param txId the transaction id * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the non-acknowledgment has been processed by the server. The handler receives the sent frame (<code>NACK</code>). * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection nack(String id, String txId, Handler<AsyncResult<io.vertx.ext.stomp.Frame>> receiptHandler) { delegate.nack(id, txId, receiptHandler); return this; }
Sends a non-acknowledgement for the given frame. It means that the frame has not been handled by the client. The sent non-acknowledgement is part of the transaction identified by the given id.
Params:
  • id – the message id of the message to acknowledge
  • txId – the transaction id
Returns:the current StompClientConnection
/** * Sends a non-acknowledgement for the given frame. It means that the frame has not been handled by the client. * The sent non-acknowledgement is part of the transaction identified by the given id. * @param id the message id of the message to acknowledge * @param txId the transaction id * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection nack(String id, String txId) { return nack(id, txId, ar -> { }); }
Sends a non-acknowledgement for the given frame. It means that the frame has not been handled by the client. The sent non-acknowledgement is part of the transaction identified by the given id.
Params:
  • id – the message id of the message to acknowledge
  • txId – the transaction id
Returns:the current StompClientConnection
/** * Sends a non-acknowledgement for the given frame. It means that the frame has not been handled by the client. * The sent non-acknowledgement is part of the transaction identified by the given id. * @param id the message id of the message to acknowledge * @param txId the transaction id * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public Single<io.vertx.ext.stomp.Frame> rxNack(String id, String txId) { return Single.create(new SingleOnSubscribeAdapter<>(fut -> { nack(id, txId, fut); })); }
Configures a received handler that get notified when a STOMP frame is received by the client. This handler can be used for logging, debugging or ad-hoc behavior. The frame can still be modified by the handler.

Unlike StompClient.receivedFrameHandler, the given handler won't receive the CONNECTED frame. If a received frame handler is set on the StompClient, it will be used by all clients connection, so calling this method is useless, except if you want to use a different handler.

Params:
  • handler – the handler
Returns:the current StompClientConnection
/** * Configures a received handler that get notified when a STOMP frame is received by the client. * This handler can be used for logging, debugging or ad-hoc behavior. The frame can still be modified by the handler. * <p> * Unlike {@link io.vertx.rxjava.ext.stomp.StompClient#receivedFrameHandler}, the given handler won't receive the <code>CONNECTED</code> frame. If a received frame handler is set on the {@link io.vertx.rxjava.ext.stomp.StompClient}, it will be used by all * clients connection, so calling this method is useless, except if you want to use a different handler. * @param handler the handler * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection receivedFrameHandler(Handler<io.vertx.ext.stomp.Frame> handler) { delegate.receivedFrameHandler(handler); return this; }
Configures a handler notified when a frame is going to be written on the wire. This handler can be used from logging, debugging. The handler can modify the received frame.

If a writing frame handler is set on the StompClient, it will be used by all clients connection, so calling this method is useless, except if you want to use a different handler.

Params:
  • handler – the handler
Returns:the current StompClientConnection
/** * Configures a handler notified when a frame is going to be written on the wire. This handler can be used from * logging, debugging. The handler can modify the received frame. * <p> * If a writing frame handler is set on the {@link io.vertx.rxjava.ext.stomp.StompClient}, it will be used by all * clients connection, so calling this method is useless, except if you want to use a different handler. * @param handler the handler * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection writingFrameHandler(Handler<io.vertx.ext.stomp.Frame> handler) { delegate.writingFrameHandler(handler); return this; }
Configures the exception handler notified upon TCP-level errors.
Params:
  • exceptionHandler – the handler
Returns:the current StompClientConnection
/** * Configures the exception handler notified upon TCP-level errors. * @param exceptionHandler the handler * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */
public io.vertx.rxjava.ext.stomp.StompClientConnection exceptionHandler(Handler<java.lang.Throwable> exceptionHandler) { delegate.exceptionHandler(exceptionHandler); return this; }
Returns whether or not the `CONNECTED` frame has been receive meaning that the Stomp connection is established.
Returns:true if the connection is established, false otherwise
/** * Returns whether or not the `CONNECTED` frame has been receive meaning that the Stomp connection is established. * @return <code>true</code> if the connection is established, <code>false</code> otherwise */
public boolean isConnected() { boolean ret = delegate.isConnected(); return ret; } public static StompClientConnection newInstance(io.vertx.ext.stomp.StompClientConnection arg) { return arg != null ? new StompClientConnection(arg) : null; } }