/** * 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<Frame> handler) { delegate.errorHandler(handler); return this; }
/** * 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<Frame> receiptHandler) { delegate.ack(id, receiptHandler); return this; }
/** * 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 sent frame (<code>SUBSCRIBE</code>). * @return the subscription id, which can either be the destination or the id set in the headers. */ public String subscribe(String destination, Map<String, String> headers, Handler<Frame> handler, Handler<Frame> receiptHandler) { String ret = delegate.subscribe(destination, headers, handler, receiptHandler); return ret; }
.writingFrameHandler(w) .exceptionHandler(err) .errorHandler(errorFrameHandler); if (!stompClientConnection.isConnected()) { resultHandler.handle(Future.failedFuture("CONNECTED frame not receive in time")); stompClientConnection.close();
/** * 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 the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */ public io.vertx.rxjava.ext.stomp.StompClientConnection disconnect(Frame frame, Handler<Frame> receiptHandler) { delegate.disconnect(frame, receiptHandler); return this; }
/** * 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<Frame> receiptHandler) { delegate.beginTX(id, receiptHandler); return this; }
/** * 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) { delegate.abort(id); return this; }
/** * 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, Map<String, String> headers, Handler<Frame> receiptHandler) { delegate.commit(id, headers, receiptHandler); 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. * <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<Frame> handler) { delegate.writingFrameHandler(handler); return this; }
/** * Closes the connection without sending the <code>DISCONNECT</code> frame. */ public void close() { delegate.close(); }
/** * 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<Throwable> exceptionHandler) { delegate.exceptionHandler(exceptionHandler); return this; }
/** * 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() { delegate.disconnect(); return this; }
/** * 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, Map<String, String> headers) { delegate.beginTX(id, headers); return this; }
/** * 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, Map<String, String> headers, Handler<Frame> receiptHandler) { delegate.abort(id, headers, receiptHandler); return this; }
/** * 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<Frame> receiptHandler) { delegate.commit(id, receiptHandler); 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. * <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<Frame> handler) { delegate.writingFrameHandler(handler); return this; }
/** * Closes the connection without sending the <code>DISCONNECT</code> frame. */ public void close() { delegate.close(); }
/** * 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<Throwable> exceptionHandler) { delegate.exceptionHandler(exceptionHandler); return this; }
/** * 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 subscription id. */ public String subscribe(String destination, Handler<Frame> handler) { String ret = delegate.subscribe(destination, handler); return ret; }
/** * 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) { delegate.ack(id); return this; }