Class StompClientConnection


  • public class StompClientConnection
    extends Object
    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 Mutiny-ified interface using Vert.x codegen.

    • Constructor Detail

      • StompClientConnection

        public StompClientConnection​(io.vertx.ext.stomp.StompClientConnection delegate)
      • StompClientConnection

        public StompClientConnection​(Object delegate)
    • Method Detail

      • getDelegate

        public io.vertx.ext.stomp.StompClientConnection getDelegate()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • session

        public String session()
        Returns:
        the session id.
      • version

        public String version()
        Returns:
        the STOMP protocol version negotiated with the server.
      • close

        public void close()
      • server

        public String server()
        Returns:
        the server name.
      • send

        public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> send​(Map<String,​String> headers,
                                                                     Buffer body)
        Sends a SEND frame to the server.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        headers - the headers, must not be null
        body - the body, may be null
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • sendAndAwait

        public io.vertx.ext.stomp.Frame sendAndAwait​(Map<String,​String> headers,
                                                     Buffer body)
        Blocking variant of io.vertx.mutiny.ext.stomp.StompClientConnection#send(Map,io.vertx.mutiny.core.buffer.Buffer).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        headers - the headers, must not be null
        body - the body, may be null
        Returns:
        the Frame instance produced by the operation.
      • sendAndForget

        public StompClientConnection sendAndForget​(Map<String,​String> headers,
                                                   Buffer body)
        Variant of io.vertx.mutiny.ext.stomp.StompClientConnection#send(Map,io.vertx.mutiny.core.buffer.Buffer) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.ext.stomp.StompClientConnection#send(Map,io.vertx.mutiny.core.buffer.Buffer), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.ext.stomp.StompClientConnection#send(Map,io.vertx.mutiny.core.buffer.Buffer) but you don't need to compose it with other operations.

        Parameters:
        headers - the headers, must not be null
        body - the body, may be null
        Returns:
        the instance of StompClientConnection to chain method calls.
      • send

        public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> send​(String destination,
                                                                     Buffer body)
        Sends a SEND frame to the server to the given destination. The message does not have any other header.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        destination - the destination, must not be null
        body - the body, may be null
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • sendAndAwait

        public io.vertx.ext.stomp.Frame sendAndAwait​(String destination,
                                                     Buffer body)
        Blocking variant of send(String,io.vertx.mutiny.core.buffer.Buffer).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        destination - the destination, must not be null
        body - the body, may be null
        Returns:
        the Frame instance produced by the operation.
      • send

        public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> send​(io.vertx.ext.stomp.Frame frame)
        Sends the given frame to the server.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        frame - the frame
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • sendAndAwait

        public io.vertx.ext.stomp.Frame sendAndAwait​(io.vertx.ext.stomp.Frame frame)
        Blocking variant of send(Frame).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        frame - the frame
        Returns:
        the Frame instance produced by the operation.
      • sendAndForget

        public StompClientConnection sendAndForget​(io.vertx.ext.stomp.Frame frame)
        Variant of send(Frame) that ignores the result of the operation.

        This method subscribes on the result of send(Frame), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from send(Frame) but you don't need to compose it with other operations.

        Parameters:
        frame - the frame
        Returns:
        the instance of StompClientConnection to chain method calls.
      • send

        public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> send​(String destination,
                                                                     Map<String,​String> headers,
                                                                     Buffer body)
        Sends a SEND frame to the server to the given destination.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        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 uni firing the result of the operation when completed, or a failure if the operation failed.
      • sendAndAwait

        public io.vertx.ext.stomp.Frame sendAndAwait​(String destination,
                                                     Map<String,​String> headers,
                                                     Buffer body)
        Blocking variant of io.vertx.mutiny.ext.stomp.StompClientConnection#send(String,Map,io.vertx.mutiny.core.buffer.Buffer).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        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 Frame instance produced by the operation.
      • sendAndForget

        public StompClientConnection sendAndForget​(String destination,
                                                   Map<String,​String> headers,
                                                   Buffer body)
        Variant of io.vertx.mutiny.ext.stomp.StompClientConnection#send(String,Map,io.vertx.mutiny.core.buffer.Buffer) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.ext.stomp.StompClientConnection#send(String,Map,io.vertx.mutiny.core.buffer.Buffer), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.ext.stomp.StompClientConnection#send(String,Map,io.vertx.mutiny.core.buffer.Buffer) but you don't need to compose it with other operations.

        Parameters:
        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 instance of StompClientConnection to chain method calls.
      • subscribe

        public io.smallrye.mutiny.Uni<String> subscribe​(String destination,
                                                        Consumer<io.vertx.ext.stomp.Frame> handler)
        Subscribes to the given destination. This destination is used as subscription id.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        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 uni firing the result of the operation when completed, or a failure if the operation failed.
      • subscribeAndAwait

        public String subscribeAndAwait​(String destination,
                                        Consumer<io.vertx.ext.stomp.Frame> handler)
        Blocking variant of io.vertx.mutiny.ext.stomp.StompClientConnection#subscribe(String,Consumer).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        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 String instance produced by the operation.
      • subscribeAndForget

        public StompClientConnection subscribeAndForget​(String destination,
                                                        Consumer<io.vertx.ext.stomp.Frame> handler)
        Variant of io.vertx.mutiny.ext.stomp.StompClientConnection#subscribe(String,Consumer) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.ext.stomp.StompClientConnection#subscribe(String,Consumer), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.ext.stomp.StompClientConnection#subscribe(String,Consumer) but you don't need to compose it with other operations.

        Parameters:
        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 instance of StompClientConnection to chain method calls.
      • subscribe

        public io.smallrye.mutiny.Uni<String> subscribe​(String destination,
                                                        Map<String,​String> headers,
                                                        Consumer<io.vertx.ext.stomp.Frame> handler)
        Subscribes to the given destination.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        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 uni firing the result of the operation when completed, or a failure if the operation failed.
      • subscribeAndAwait

        public String subscribeAndAwait​(String destination,
                                        Map<String,​String> headers,
                                        Consumer<io.vertx.ext.stomp.Frame> handler)
        Blocking variant of io.vertx.mutiny.ext.stomp.StompClientConnection#subscribe(String,Map,Consumer).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        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 String instance produced by the operation.
      • subscribeAndForget

        public StompClientConnection subscribeAndForget​(String destination,
                                                        Map<String,​String> headers,
                                                        Consumer<io.vertx.ext.stomp.Frame> handler)
        Variant of io.vertx.mutiny.ext.stomp.StompClientConnection#subscribe(String,Map,Consumer) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.ext.stomp.StompClientConnection#subscribe(String,Map,Consumer), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.ext.stomp.StompClientConnection#subscribe(String,Map,Consumer) but you don't need to compose it with other operations.

        Parameters:
        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 instance of StompClientConnection to chain method calls.
      • unsubscribe

        public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> unsubscribe​(String destination)
        Un-subscribes from the given destination. This method only works if the subscription did not specifies a subscription id (using the id header).

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        destination - the destination
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • unsubscribeAndAwait

        public io.vertx.ext.stomp.Frame unsubscribeAndAwait​(String destination)
        Blocking variant of unsubscribe(String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        destination - the destination
        Returns:
        the Frame instance produced by the operation.
      • unsubscribeAndForget

        public StompClientConnection unsubscribeAndForget​(String destination)
        Variant of unsubscribe(String) that ignores the result of the operation.

        This method subscribes on the result of unsubscribe(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from unsubscribe(String) but you don't need to compose it with other operations.

        Parameters:
        destination - the destination
        Returns:
        the instance of StompClientConnection to chain method calls.
      • unsubscribe

        public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> unsubscribe​(String destination,
                                                                            Map<String,​String> headers)
        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.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        destination - the destination
        headers - the headers
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • unsubscribeAndAwait

        public io.vertx.ext.stomp.Frame unsubscribeAndAwait​(String destination,
                                                            Map<String,​String> headers)
        Blocking variant of io.vertx.mutiny.ext.stomp.StompClientConnection#unsubscribe(String,Map).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        destination - the destination
        headers - the headers
        Returns:
        the Frame instance produced by the operation.
      • unsubscribeAndForget

        public StompClientConnection unsubscribeAndForget​(String destination,
                                                          Map<String,​String> headers)
        Variant of io.vertx.mutiny.ext.stomp.StompClientConnection#unsubscribe(String,Map) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.ext.stomp.StompClientConnection#unsubscribe(String,Map), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.ext.stomp.StompClientConnection#unsubscribe(String,Map) but you don't need to compose it with other operations.

        Parameters:
        destination - the destination
        headers - the headers
        Returns:
        the instance of StompClientConnection to chain method calls.
      • errorHandler

        public StompClientConnection errorHandler​(Consumer<io.vertx.ext.stomp.Frame> handler)
        Parameters:
        handler - the handler
        Returns:
      • beginTX

        public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> beginTX​(String id)
        Begins a transaction.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        id - the transaction id, must not be null
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • beginTXAndAwait

        public io.vertx.ext.stomp.Frame beginTXAndAwait​(String id)
        Blocking variant of beginTX(String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        id - the transaction id, must not be null
        Returns:
        the Frame instance produced by the operation.
      • beginTXAndForget

        public StompClientConnection beginTXAndForget​(String id)
        Variant of beginTX(String) that ignores the result of the operation.

        This method subscribes on the result of beginTX(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from beginTX(String) but you don't need to compose it with other operations.

        Parameters:
        id - the transaction id, must not be null
        Returns:
        the instance of StompClientConnection to chain method calls.
      • beginTX

        public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> beginTX​(String id,
                                                                        Map<String,​String> headers)
        Begins a transaction.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        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 uni firing the result of the operation when completed, or a failure if the operation failed.
      • beginTXAndAwait

        public io.vertx.ext.stomp.Frame beginTXAndAwait​(String id,
                                                        Map<String,​String> headers)
        Blocking variant of io.vertx.mutiny.ext.stomp.StompClientConnection#beginTX(String,Map).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        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 Frame instance produced by the operation.
      • beginTXAndForget

        public StompClientConnection beginTXAndForget​(String id,
                                                      Map<String,​String> headers)
        Variant of io.vertx.mutiny.ext.stomp.StompClientConnection#beginTX(String,Map) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.ext.stomp.StompClientConnection#beginTX(String,Map), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.ext.stomp.StompClientConnection#beginTX(String,Map) but you don't need to compose it with other operations.

        Parameters:
        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 instance of StompClientConnection to chain method calls.
      • commit

        public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> commit​(String id)
        Commits a transaction.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        id - the transaction id, must not be null
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • commitAndAwait

        public io.vertx.ext.stomp.Frame commitAndAwait​(String id)
        Blocking variant of commit(String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        id - the transaction id, must not be null
        Returns:
        the Frame instance produced by the operation.
      • commitAndForget

        public StompClientConnection commitAndForget​(String id)
        Variant of commit(String) that ignores the result of the operation.

        This method subscribes on the result of commit(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from commit(String) but you don't need to compose it with other operations.

        Parameters:
        id - the transaction id, must not be null
        Returns:
        the instance of StompClientConnection to chain method calls.
      • commit

        public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> commit​(String id,
                                                                       Map<String,​String> headers)
        Commits a transaction.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        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 uni firing the result of the operation when completed, or a failure if the operation failed.
      • commitAndAwait

        public io.vertx.ext.stomp.Frame commitAndAwait​(String id,
                                                       Map<String,​String> headers)
        Blocking variant of io.vertx.mutiny.ext.stomp.StompClientConnection#commit(String,Map).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        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 Frame instance produced by the operation.
      • commitAndForget

        public StompClientConnection commitAndForget​(String id,
                                                     Map<String,​String> headers)
        Variant of io.vertx.mutiny.ext.stomp.StompClientConnection#commit(String,Map) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.ext.stomp.StompClientConnection#commit(String,Map), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.ext.stomp.StompClientConnection#commit(String,Map) but you don't need to compose it with other operations.

        Parameters:
        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 instance of StompClientConnection to chain method calls.
      • abort

        public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> abort​(String id)
        Aborts a transaction.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        id - the transaction id, must not be null
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • abortAndAwait

        public io.vertx.ext.stomp.Frame abortAndAwait​(String id)
        Blocking variant of abort(String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        id - the transaction id, must not be null
        Returns:
        the Frame instance produced by the operation.
      • abortAndForget

        public StompClientConnection abortAndForget​(String id)
        Variant of abort(String) that ignores the result of the operation.

        This method subscribes on the result of abort(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from abort(String) but you don't need to compose it with other operations.

        Parameters:
        id - the transaction id, must not be null
        Returns:
        the instance of StompClientConnection to chain method calls.
      • abort

        public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> abort​(String id,
                                                                      Map<String,​String> headers)
        Aborts a transaction.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        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 uni firing the result of the operation when completed, or a failure if the operation failed.
      • abortAndAwait

        public io.vertx.ext.stomp.Frame abortAndAwait​(String id,
                                                      Map<String,​String> headers)
        Blocking variant of io.vertx.mutiny.ext.stomp.StompClientConnection#abort(String,Map).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        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 Frame instance produced by the operation.
      • abortAndForget

        public StompClientConnection abortAndForget​(String id,
                                                    Map<String,​String> headers)
        Variant of io.vertx.mutiny.ext.stomp.StompClientConnection#abort(String,Map) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.ext.stomp.StompClientConnection#abort(String,Map), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.ext.stomp.StompClientConnection#abort(String,Map) but you don't need to compose it with other operations.

        Parameters:
        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 instance of StompClientConnection to chain method calls.
      • disconnect

        public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> disconnect()
        Disconnects the client. Unlike the close() method, this method send the DISCONNECT frame to the server.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • disconnectAndAwait

        public io.vertx.ext.stomp.Frame disconnectAndAwait()
        Blocking variant of disconnect().

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Returns:
        the Frame instance produced by the operation.
      • disconnectAndForget

        public StompClientConnection disconnectAndForget()
        Variant of disconnect() that ignores the result of the operation.

        This method subscribes on the result of disconnect(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from disconnect() but you don't need to compose it with other operations.

        Returns:
        the instance of StompClientConnection to chain method calls.
      • disconnect

        public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> disconnect​(io.vertx.ext.stomp.Frame frame)
        Disconnects the client. Unlike the close() method, this method send the DISCONNECT frame to the server. This method lets you customize the DISCONNECT frame.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        frame - the DISCONNECT frame.
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • disconnectAndAwait

        public io.vertx.ext.stomp.Frame disconnectAndAwait​(io.vertx.ext.stomp.Frame frame)
        Blocking variant of disconnect(Frame).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        frame - the DISCONNECT frame.
        Returns:
        the Frame instance produced by the operation.
      • disconnectAndForget

        public StompClientConnection disconnectAndForget​(io.vertx.ext.stomp.Frame frame)
        Variant of disconnect(Frame) that ignores the result of the operation.

        This method subscribes on the result of disconnect(Frame), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from disconnect(Frame) but you don't need to compose it with other operations.

        Parameters:
        frame - the DISCONNECT frame.
        Returns:
        the instance of StompClientConnection to chain method calls.
      • ack

        public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> ack​(String id)
        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.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        id - the message id of the message to acknowledge
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • ackAndAwait

        public io.vertx.ext.stomp.Frame ackAndAwait​(String id)
        Blocking variant of ack(String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        id - the message id of the message to acknowledge
        Returns:
        the Frame instance produced by the operation.
      • ackAndForget

        public StompClientConnection ackAndForget​(String id)
        Variant of ack(String) that ignores the result of the operation.

        This method subscribes on the result of ack(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from ack(String) but you don't need to compose it with other operations.

        Parameters:
        id - the message id of the message to acknowledge
        Returns:
        the instance of StompClientConnection to chain method calls.
      • nack

        public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> nack​(String id)
        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.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        id - the message id of the message to acknowledge
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • nackAndAwait

        public io.vertx.ext.stomp.Frame nackAndAwait​(String id)
        Blocking variant of nack(String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        id - the message id of the message to acknowledge
        Returns:
        the Frame instance produced by the operation.
      • nackAndForget

        public StompClientConnection nackAndForget​(String id)
        Variant of nack(String) that ignores the result of the operation.

        This method subscribes on the result of nack(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from nack(String) but you don't need to compose it with other operations.

        Parameters:
        id - the message id of the message to acknowledge
        Returns:
        the instance of StompClientConnection to chain method calls.
      • ack

        public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> ack​(String id,
                                                                    String txId)
        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.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        id - the message id of the message to acknowledge
        txId - the transaction id
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • ackAndAwait

        public io.vertx.ext.stomp.Frame ackAndAwait​(String id,
                                                    String txId)
        Blocking variant of ack(String,String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        id - the message id of the message to acknowledge
        txId - the transaction id
        Returns:
        the Frame instance produced by the operation.
      • ackAndForget

        public StompClientConnection ackAndForget​(String id,
                                                  String txId)
        Variant of ack(String,String) that ignores the result of the operation.

        This method subscribes on the result of ack(String,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from ack(String,String) but you don't need to compose it with other operations.

        Parameters:
        id - the message id of the message to acknowledge
        txId - the transaction id
        Returns:
        the instance of StompClientConnection to chain method calls.
      • nack

        public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> nack​(String id,
                                                                     String txId)
        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.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        id - the message id of the message to acknowledge
        txId - the transaction id
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • nackAndAwait

        public io.vertx.ext.stomp.Frame nackAndAwait​(String id,
                                                     String txId)
        Blocking variant of nack(String,String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        id - the message id of the message to acknowledge
        txId - the transaction id
        Returns:
        the Frame instance produced by the operation.
      • nackAndForget

        public StompClientConnection nackAndForget​(String id,
                                                   String txId)
        Variant of nack(String,String) that ignores the result of the operation.

        This method subscribes on the result of nack(String,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from nack(String,String) but you don't need to compose it with other operations.

        Parameters:
        id - the message id of the message to acknowledge
        txId - the transaction id
        Returns:
        the instance of StompClientConnection to chain method calls.
      • receivedFrameHandler

        public StompClientConnection receivedFrameHandler​(Consumer<io.vertx.ext.stomp.Frame> handler)
        Parameters:
        handler - the handler
        Returns:
      • writingFrameHandler

        public StompClientConnection writingFrameHandler​(Consumer<io.vertx.ext.stomp.Frame> handler)
        Parameters:
        handler - the handler
        Returns:
      • isConnected

        public boolean isConnected()
        Returns:
        true if the connection is established, false otherwise
      • newInstance

        public static StompClientConnection newInstance​(io.vertx.ext.stomp.StompClientConnection arg)