Package: io.vertx.groovy.ext.stomp

## [Groovy] Class StompClientConnection

- io.vertx.groovy.ext.stomp.StompClientConnection

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

- - ### Constructor Summary

    Constructors
    Constructor and description
    `StompClientConnection (java.lang.Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `StompClientConnection` | `abort(java.lang.String id)` Aborts a transaction.
    `StompClientConnection` | `abort(java.lang.String id, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Aborts a transaction.
    `StompClientConnection` | `abort(java.lang.String id, java.util.Map<java.lang.String, java.lang.String> headers)` Aborts a transaction.
    `StompClientConnection` | `abort(java.lang.String id, java.util.Map<java.lang.String, java.lang.String> headers, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Aborts a transaction.
    `StompClientConnection` | `ack(java.lang.String id)` Sends an acknowledgement for a specific message.
    `StompClientConnection` | `ack(java.lang.String id, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Sends an acknowledgement for a specific message.
    `StompClientConnection` | `ack(java.lang.String id, java.lang.String txId)` Sends an acknowledgement for the given frame.
    `StompClientConnection` | `ack(java.lang.String id, java.lang.String txId, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Sends an acknowledgement for the given frame.
    `StompClientConnection` | `beginTX(java.lang.String id, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Begins a transaction.
    `StompClientConnection` | `beginTX(java.lang.String id)` Begins a transaction.
    `StompClientConnection` | `beginTX(java.lang.String id, java.util.Map<java.lang.String, java.lang.String> headers)` Begins a transaction.
    `StompClientConnection` | `beginTX(java.lang.String id, java.util.Map<java.lang.String, java.lang.String> headers, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Begins a transaction.
    `void` | `close()` Closes the connection without sending the `DISCONNECT` frame.
    `StompClientConnection` | `closeHandler(io.vertx.core.Handler<StompClientConnection> handler)` Sets a handler notified when the STOMP connection is closed.
    `StompClientConnection` | `commit(java.lang.String id)` Commits a transaction.
    `StompClientConnection` | `commit(java.lang.String id, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Commits a transaction.
    `StompClientConnection` | `commit(java.lang.String id, java.util.Map<java.lang.String, java.lang.String> headers)` Commits a transaction.
    `StompClientConnection` | `commit(java.lang.String id, java.util.Map<java.lang.String, java.lang.String> headers, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Commits a transaction.
    `StompClientConnection` | `connectionDroppedHandler(io.vertx.core.Handler<StompClientConnection> handler)` Sets a handler notified when the server does not respond to a `ping` request in time.
    `StompClientConnection` | `disconnect()` Disconnects the client.
    `StompClientConnection` | `disconnect(io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Disconnects the client.
    `StompClientConnection` | `disconnect(java.util.Map<java.lang.String, java.lang.Object> frame)` Disconnects the client.
    `StompClientConnection` | `disconnect(java.util.Map<java.lang.String, java.lang.Object> frame, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Disconnects the client.
    `StompClientConnection` | `errorHandler(io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> handler)` Sets a handler notified when an `ERROR` frame is received by the client.
    `java.lang.Object` | `getDelegate()`
    `StompClientConnection` | `nack(java.lang.String id)` Sends a non-acknowledgement for the given message.
    `StompClientConnection` | `nack(java.lang.String id, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Sends a non-acknowledgement for the given message.
    `StompClientConnection` | `nack(java.lang.String id, java.lang.String txId)` Sends a non-acknowledgement for the given frame.
    `StompClientConnection` | `nack(java.lang.String id, java.lang.String txId, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Sends a non-acknowledgement for the given frame.
    `StompClientConnection` | `pingHandler(io.vertx.core.Handler<StompClientConnection> handler)` Sets a handler that let customize the behavior when a ping needs to be sent to the server.
    `StompClientConnection` | `receivedFrameHandler(io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> handler)` Configures a received handler that get notified when a STOMP frame is received by the client.
    `StompClientConnection` | `send(java.util.Map<java.lang.String, java.lang.String> headers, Buffer body)` Sends a `SEND` frame to the server.
    `StompClientConnection` | `send(java.util.Map<java.lang.String, java.lang.String> headers, Buffer body, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Sends a `SEND` frame to the server.
    `StompClientConnection` | `send(java.lang.String destination, Buffer body)` Sends a `SEND` frame to the server to the given destination.
    `StompClientConnection` | `send(java.lang.String destination, Buffer body, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Sends a `SEND` frame to the server to the given destination.
    `StompClientConnection` | `send(java.util.Map<java.lang.String, java.lang.Object> frame = [:])` Sends the given frame to the server.
    `StompClientConnection` | `send(java.util.Map<java.lang.String, java.lang.Object> frame = [:], io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Sends the given frame to the server.
    `StompClientConnection` | `send(java.lang.String destination, java.util.Map<java.lang.String, java.lang.String> headers, Buffer body)` Sends a `SEND` frame to the server to the given destination.
    `StompClientConnection` | `send(java.lang.String destination, java.util.Map<java.lang.String, java.lang.String> headers, Buffer body, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Sends a `SEND` frame to the server to the given destination.
    `java.lang.String` | `server()` @return the server name.
    `java.lang.String` | `session()` @return the session id.
    `java.lang.String` | `subscribe(java.lang.String destination, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> handler)` Subscribes to the given destination.
    `java.lang.String` | `subscribe(java.lang.String destination, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> handler, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Subscribes to the given destination.
    `java.lang.String` | `subscribe(java.lang.String destination, java.util.Map<java.lang.String, java.lang.String> headers, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> handler)` Subscribes to the given destination.
    `java.lang.String` | `subscribe(java.lang.String destination, java.util.Map<java.lang.String, java.lang.String> headers, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> handler, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Subscribes to the given destination.
    `StompClientConnection` | `unsubscribe(java.lang.String destination)` Un-subscribes from the given destination.
    `StompClientConnection` | `unsubscribe(java.lang.String destination, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Un-subscribes from the given destination.
    `StompClientConnection` | `unsubscribe(java.lang.String destination, java.util.Map<java.lang.String, java.lang.String> headers)` Un-subscribes from the given destination.
    `StompClientConnection` | `unsubscribe(java.lang.String destination, java.util.Map<java.lang.String, java.lang.String> headers, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)` Un-subscribes from the given destination.
    `java.lang.String` | `version()` @return the STOMP protocol version negotiated with the server.
    `StompClientConnection` | `writingFrameHandler(io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> handler)` Configures a handler notified when a frame is going to be written on the wire.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Constructor Detail

    - #### StompClientConnection(java.lang.Object delegate)

  - ### Method Detail

    - #### StompClientConnection abort(java.lang.String id)

      Aborts a transaction.

      Returns:
        the current StompClientConnection
      Parameters:
        `id` - the transaction id, must not be `null`

    - #### StompClientConnection abort(java.lang.String id, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      Aborts a transaction.

      Returns:
        the current StompClientConnection
      Parameters:
        `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`).

    - #### StompClientConnection abort(java.lang.String id, java.util.Map<java.lang.String, java.lang.String> headers)

      Aborts a transaction. @{code id} parameter

      Returns:
        the current StompClientConnection
      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

    - #### StompClientConnection abort(java.lang.String id, java.util.Map<java.lang.String, java.lang.String> headers, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      Aborts a transaction. @{code id} parameter

      Returns:
        the current StompClientConnection
      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
        `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`).

    - #### StompClientConnection ack(java.lang.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.

      Returns:
        the current StompClientConnection
      Parameters:
        `id` - the message id of the message to acknowledge

    - #### StompClientConnection ack(java.lang.String id, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      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.

      Returns:
        the current StompClientConnection
      Parameters:
        `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`).

    - #### StompClientConnection ack(java.lang.String id, java.lang.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.

      Returns:
        the current StompClientConnection
      Parameters:
        `id` - the message id of the message to acknowledge
        `txId` - the transaction id

    - #### StompClientConnection ack(java.lang.String id, java.lang.String txId, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      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.

      Returns:
        the current StompClientConnection
      Parameters:
        `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`).

    - #### StompClientConnection beginTX(java.lang.String id, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      Begins a transaction.

      Returns:
        the current StompClientConnection
      Parameters:
        `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`).

    - #### StompClientConnection beginTX(java.lang.String id)

      Begins a transaction.

      Returns:
        the current StompClientConnection
      Parameters:
        `id` - the transaction id, must not be `null`

    - #### StompClientConnection beginTX(java.lang.String id, java.util.Map<java.lang.String, java.lang.String> headers)

      Begins a transaction. @{code id} parameter

      Returns:
        the current StompClientConnection
      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

    - #### StompClientConnection beginTX(java.lang.String id, java.util.Map<java.lang.String, java.lang.String> headers, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      Begins a transaction. @{code id} parameter

      Returns:
        the current StompClientConnection
      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
        `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`).

    - #### void close()

      Closes the connection without sending the `DISCONNECT` frame.

    - #### StompClientConnection closeHandler(io.vertx.core.Handler<StompClientConnection> handler)

      Sets a handler notified when the STOMP connection is closed.

      Returns:
        the current StompClientConnection
      Parameters:
        `handler` - the handler

    - #### StompClientConnection commit(java.lang.String id)

      Commits a transaction.

      Returns:
        the current StompClientConnection
      Parameters:
        `id` - the transaction id, must not be `null`

    - #### StompClientConnection commit(java.lang.String id, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      Commits a transaction.

      Returns:
        the current StompClientConnection
      Parameters:
        `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`).

    - #### StompClientConnection commit(java.lang.String id, java.util.Map<java.lang.String, java.lang.String> headers)

      Commits a transaction. @{code id} parameter

      Returns:
        the current StompClientConnection
      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

    - #### StompClientConnection commit(java.lang.String id, java.util.Map<java.lang.String, java.lang.String> headers, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      Commits a transaction. @{code id} parameter

      Returns:
        the current StompClientConnection
      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
        `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`).

    - #### StompClientConnection connectionDroppedHandler(io.vertx.core.Handler<StompClientConnection> handler)

      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.

      Returns:
        the current StompClientConnection receiving the dropped connection.
      Parameters:
        `handler` - the handler

    - #### StompClientConnection disconnect()

      Disconnects the client. Unlike the StompClientConnection.close method, this method send the `DISCONNECT` frame to the server.

      Returns:
        the current StompClientConnection

    - #### StompClientConnection disconnect(io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      Disconnects the client. Unlike the StompClientConnection.close method, this method send the `DISCONNECT` frame to the server.

      Returns:
        the current StompClientConnection
      Parameters:
        `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`).

    - #### StompClientConnection disconnect(java.util.Map<java.lang.String, java.lang.Object> frame)

      Disconnects the client. Unlike the StompClientConnection.close method, this method send the `DISCONNECT` frame to the server. This method lets you customize the `DISCONNECT` frame.

      Returns:
        the current StompClientConnection
      Parameters:
        `frame` - the `DISCONNECT` frame. (see Frame)

    - #### StompClientConnection disconnect(java.util.Map<java.lang.String, java.lang.Object> frame, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      Disconnects the client. Unlike the StompClientConnection.close method, this method send the `DISCONNECT` frame to the server. This method lets you customize the `DISCONNECT` frame.

      Returns:
        the current StompClientConnection
      Parameters:
        `frame` - the `DISCONNECT` frame. (see 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`).

    - #### StompClientConnection errorHandler(io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> handler)

      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.

      Returns:
        the current StompClientConnection
      Parameters:
        `handler` - the handler

    - #### java.lang.Object getDelegate()

    - #### StompClientConnection nack(java.lang.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.

      Returns:
        the current StompClientConnection
      Parameters:
        `id` - the message id of the message to acknowledge

    - #### StompClientConnection nack(java.lang.String id, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      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.

      Returns:
        the current StompClientConnection
      Parameters:
        `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`).

    - #### StompClientConnection nack(java.lang.String id, java.lang.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.

      Returns:
        the current StompClientConnection
      Parameters:
        `id` - the message id of the message to acknowledge
        `txId` - the transaction id

    - #### StompClientConnection nack(java.lang.String id, java.lang.String txId, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      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.

      Returns:
        the current StompClientConnection
      Parameters:
        `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`).

    - #### StompClientConnection pingHandler(io.vertx.core.Handler<StompClientConnection> handler)

      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.

      Returns:
        the current StompClientConnection
      Parameters:
        `handler` - the handler

    - #### StompClientConnection receivedFrameHandler(io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> handler)

      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.

      Returns:
        the current StompClientConnection
      Parameters:
        `handler` - the handler

    - #### StompClientConnection send(java.util.Map<java.lang.String, java.lang.String> headers, Buffer body)

      Sends a `SEND` frame to the server.

      Returns:
        the current StompClientConnection
      Parameters:
        `headers` - the headers, must not be `null`
        `body` - the body, may be `null`

    - #### StompClientConnection send(java.util.Map<java.lang.String, java.lang.String> headers, Buffer body, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      Sends a `SEND` frame to the server.

      Returns:
        the current StompClientConnection
      Parameters:
        `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.

    - #### StompClientConnection send(java.lang.String destination, Buffer body)

      Sends a `SEND` frame to the server to the given destination. The message does not have any other header.

      Returns:
        the current StompClientConnection
      Parameters:
        `destination` - the destination, must not be `null`
        `body` - the body, may be `null`

    - #### StompClientConnection send(java.lang.String destination, Buffer body, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      Sends a `SEND` frame to the server to the given destination. The message does not have any other header.

      Returns:
        the current StompClientConnection
      Parameters:
        `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.

    - #### StompClientConnection send(java.util.Map<java.lang.String, java.lang.Object> frame = [:])

      Sends the given frame to the server.

      Returns:
        the current StompClientConnection
      Parameters:
        `frame` - the frame (see Frame)

    - #### StompClientConnection send(java.util.Map<java.lang.String, java.lang.Object> frame = [:], io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      Sends the given frame to the server.

      Returns:
        the current StompClientConnection
      Parameters:
        `frame` - the frame (see Frame)
        `receiptHandler` - the handler invoked when the `RECEIPT` frame associated with the sent frame has been received. The handler receives the sent frame.

    - #### StompClientConnection send(java.lang.String destination, java.util.Map<java.lang.String, java.lang.String> headers, Buffer body)

      Sends a `SEND` frame to the server to the given destination.

      Returns:
        the current StompClientConnection
      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`

    - #### StompClientConnection send(java.lang.String destination, java.util.Map<java.lang.String, java.lang.String> headers, Buffer body, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      Sends a `SEND` frame to the server to the given destination.

      Returns:
        the current StompClientConnection
      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`
        `receiptHandler` - the handler invoked when the `RECEIPT` frame associated with the sent frame has been received. The handler receives the sent frame.

    - #### java.lang.String server()

      Returns:
        the server name.

    - #### java.lang.String session()

      Returns:
        the session id.

    - #### java.lang.String subscribe(java.lang.String destination, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> handler)

      Subscribes to the given destination. This destination is used as subscription id.

      Returns:
        the subscription id.
      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`.

    - #### java.lang.String subscribe(java.lang.String destination, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> handler, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      Subscribes to the given destination. This destination is used as subscription id.

      Returns:
        the subscription id.
      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`.
        `receiptHandler` - the handler invoked when the `RECEIPT` frame associated with the subscription has been received. The handler receives the sent frame (`SUBSCRIBE`).

    - #### java.lang.String subscribe(java.lang.String destination, java.util.Map<java.lang.String, java.lang.String> headers, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> handler)

      Subscribes to the given destination.

      Returns:
        the subscription id, which can either be the destination or the id set in the headers.
      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`.

    - #### java.lang.String subscribe(java.lang.String destination, java.util.Map<java.lang.String, java.lang.String> headers, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> handler, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      Subscribes to the given destination.

      Returns:
        the subscription id, which can either be the destination or the id set in the headers.
      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`.
        `receiptHandler` - the handler invoked when the `RECEIPT` frame associated with the subscription has been received. The handler receives the sent frame (`SUBSCRIBE`).

    - #### StompClientConnection unsubscribe(java.lang.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).

      Returns:
        the current StompClientConnection
      Parameters:
        `destination` - the destination

    - #### StompClientConnection unsubscribe(java.lang.String destination, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      Un-subscribes from the given destination. This method only works if the subscription did not specifies a subscription id (using the `id` header).

      Returns:
        the current StompClientConnection
      Parameters:
        `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`).

    - #### StompClientConnection unsubscribe(java.lang.String destination, java.util.Map<java.lang.String, java.lang.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.

      Returns:
        the current StompClientConnection
      Parameters:
        `destination` - the destination
        `headers` - the headers

    - #### StompClientConnection unsubscribe(java.lang.String destination, java.util.Map<java.lang.String, java.lang.String> headers, io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> receiptHandler)

      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.

      Returns:
        the current StompClientConnection
      Parameters:
        `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`).

    - #### java.lang.String version()

      Returns:
        the STOMP protocol version negotiated with the server.

    - #### StompClientConnection writingFrameHandler(io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> handler)

      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.

      Returns:
        the current StompClientConnection
      Parameters:
        `handler` - the handler