vertx-lang-scala-docs_2.12 3.4.2 API < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package io
  Definition Classes
    root
-  package vertx
  Definition Classes
    io
-  package scala
  Definition Classes
    vertx
-  package ext
  Definition Classes
    scala
-  package stomp
  Definition Classes
    ext
- Acknowledgement
- BridgeOptions
- Destination
- DestinationFactory
- Frame
- Frames
- ServerFrame
- StompClient
- StompClientConnection
- StompClientOptions
- StompServer
- StompServerConnection
- StompServerHandler
- StompServerOptions

c

io.vertx.scala.ext.stomp

# StompClientConnection 

###
Companion object StompClientConnection

#### class StompClientConnection extends AnyRef

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

Linear Supertypes
AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. StompClientConnection
2. AnyRef
3. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1.  new StompClientConnection(_asJava: AnyRef)

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  def abort(id: String, headers: Map[String, String], receiptHandler: Handler[Frame]): StompClientConnection

   Aborts a transaction.

   Aborts a transaction.

   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

5.  def abort(id: String, headers: Map[String, String]): StompClientConnection

   Aborts a transaction.

   Aborts a transaction.

   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

6.  def abort(id: String, receiptHandler: Handler[Frame]): StompClientConnection

   Aborts a transaction.

   Aborts a transaction.

   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

7.  def abort(id: String): StompClientConnection

   Aborts a transaction.

   Aborts a transaction.

   id

     the transaction id, must not be `null`

   returns

     the current StompClientConnection

8.  def ack(id: String, txId: String, receiptHandler: Handler[Frame]): StompClientConnection

   Sends an acknowledgement for the given frame.

   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.

   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

9.  def ack(id: String, txId: String): StompClientConnection

   Sends an acknowledgement for the given frame.

   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.

   id

     the message id of the message to acknowledge

   txId

     the transaction id

   returns

     the current StompClientConnection

10.  def ack(id: String, receiptHandler: Handler[Frame]): StompClientConnection

    Sends an acknowledgement for a specific message.

    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.

    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

11.  def ack(id: String): StompClientConnection

    Sends an acknowledgement for a specific message.

    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.

    id

      the message id of the message to acknowledge

    returns

      the current StompClientConnection

12.  final def asInstanceOf[T0]: T0
    Definition Classes
      Any
13.  def asJava: AnyRef
14.  def beginTX(id: String, headers: Map[String, String], receiptHandler: Handler[Frame]): StompClientConnection

    Begins a transaction.

    Begins a transaction.

    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

15.  def beginTX(id: String, headers: Map[String, String]): StompClientConnection

    Begins a transaction.

    Begins a transaction.

    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

16.  def beginTX(id: String): StompClientConnection

    Begins a transaction.

    Begins a transaction.

    id

      the transaction id, must not be `null`

    returns

      the current StompClientConnection

17.  def beginTX(id: String, receiptHandler: Handler[Frame]): StompClientConnection

    Begins a transaction.

    Begins a transaction.

    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

18.  def clone(): AnyRef
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
19.  def close(): Unit

    Closes the connection without sending the `DISCONNECT` frame.

20.  def closeHandler(handler: Handler[StompClientConnection]): StompClientConnection

    Sets a handler notified when the STOMP connection is closed.

    Sets a handler notified when the STOMP connection is closed.

    handler

      the handler

    returns

      the current StompClientConnection

21.  def commit(id: String, headers: Map[String, String], receiptHandler: Handler[Frame]): StompClientConnection

    Commits a transaction.

    Commits a transaction.

    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

22.  def commit(id: String, headers: Map[String, String]): StompClientConnection

    Commits a transaction.

    Commits a transaction.

    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

23.  def commit(id: String, receiptHandler: Handler[Frame]): StompClientConnection

    Commits a transaction.

    Commits a transaction.

    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

24.  def commit(id: String): StompClientConnection

    Commits a transaction.

    Commits a transaction.

    id

      the transaction id, must not be `null`

    returns

      the current StompClientConnection

25.  def connectionDroppedHandler(handler: Handler[StompClientConnection]): StompClientConnection

    Sets a handler notified when the server does not respond to a `ping` request in time.

    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.

    handler

      the handler

    returns

      the current StompClientConnection receiving the dropped connection.

26.  def disconnect(frame: Frame, receiptHandler: Handler[Frame]): StompClientConnection

    Disconnects the client.

    Disconnects the client. Unlike the io.vertx.scala.ext.stomp.StompClientConnection#close method, this method send the `DISCONNECT` frame to the server. This method lets you customize the `DISCONNECT` frame.

    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`).

    returns

      the current StompClientConnection

27.  def disconnect(frame: Frame): StompClientConnection

    Disconnects the client.

    Disconnects the client. Unlike the io.vertx.scala.ext.stomp.StompClientConnection#close method, this method send the `DISCONNECT` frame to the server. This method lets you customize the `DISCONNECT` frame.

    frame

      the `DISCONNECT` frame.see Frame

    returns

      the current StompClientConnection

28.  def disconnect(receiptHandler: Handler[Frame]): StompClientConnection

    Disconnects the client.

    Disconnects the client. Unlike the io.vertx.scala.ext.stomp.StompClientConnection#close method, this method send the `DISCONNECT` frame to the server.

    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

29.  def disconnect(): StompClientConnection

    Disconnects the client.

    Disconnects the client. Unlike the io.vertx.scala.ext.stomp.StompClientConnection#close method, this method send the `DISCONNECT` frame to the server.

    returns

      the current StompClientConnection

30.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
31.  def equals(arg0: Any): Boolean
    Definition Classes
      AnyRef → Any
32.  def errorHandler(handler: Handler[Frame]): StompClientConnection

    Sets a handler notified when an `ERROR` frame is received by the client.

    Sets a handler notified when an `ERROR` frame is received by the client. The handler receives the `ERROR` frame and a reference on the io.vertx.scala.ext.stomp.StompClientConnection.

    handler

      the handler

    returns

      the current StompClientConnection

33.  def finalize(): Unit
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
34.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
35.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
36.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
37.  def nack(id: String, txId: String, receiptHandler: Handler[Frame]): StompClientConnection

    Sends a non-acknowledgement for the given frame.

    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.

    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

38.  def nack(id: String, txId: String): StompClientConnection

    Sends a non-acknowledgement for the given frame.

    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.

    id

      the message id of the message to acknowledge

    txId

      the transaction id

    returns

      the current StompClientConnection

39.  def nack(id: String, receiptHandler: Handler[Frame]): StompClientConnection

    Sends a non-acknowledgement for the given message.

    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.

    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

40.  def nack(id: String): StompClientConnection

    Sends a non-acknowledgement for the given message.

    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.

    id

      the message id of the message to acknowledge

    returns

      the current StompClientConnection

41.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
42.  final def notify(): Unit
    Definition Classes
      AnyRef
43.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
44.  def pingHandler(handler: Handler[StompClientConnection]): StompClientConnection

    Sets a handler that let customize the behavior when a ping needs to be sent to the server.

    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.

    handler

      the handler

    returns

      the current StompClientConnection

45.  def receivedFrameHandler(handler: Handler[Frame]): StompClientConnection

    Configures a received handler that get notified when a STOMP frame is received by the client.

    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 io.vertx.scala.ext.stomp.StompClient#receivedFrameHandler, the given handler won't receive the `CONNECTED` frame. If a received frame handler is set on the io.vertx.scala.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.

    handler

      the handler

    returns

      the current StompClientConnection

46.  def send(destination: String, headers: Map[String, String], body: Buffer, receiptHandler: Handler[Frame]): StompClientConnection

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

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

    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

47.  def send(destination: String, headers: Map[String, String], body: Buffer): StompClientConnection

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

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

    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

48.  def send(frame: Frame, receiptHandler: Handler[Frame]): StompClientConnection

    Sends the given frame to the server.

    Sends the given frame to the server.

    frame

      the framesee 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

49.  def send(frame: Frame): StompClientConnection

    Sends the given frame to the server.

    Sends the given frame to the server.

    frame

      the framesee Frame

    returns

      the current StompClientConnection

50.  def send(destination: String, body: Buffer, receiptHandler: Handler[Frame]): StompClientConnection

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

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

    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

51.  def send(destination: String, body: Buffer): StompClientConnection

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

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

    destination

      the destination, must not be `null`

    body

      the body, may be `null`

    returns

      the current StompClientConnection

52.  def send(headers: Map[String, String], body: Buffer, receiptHandler: Handler[Frame]): StompClientConnection

    Sends a `SEND` frame to the server.

    Sends a `SEND` frame to the server.

    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

53.  def send(headers: Map[String, String], body: Buffer): StompClientConnection

    Sends a `SEND` frame to the server.

    Sends a `SEND` frame to the server.

    headers

      the headers, must not be `null`

    body

      the body, may be `null`

    returns

      the current StompClientConnection

54.  def server(): String

    returns

      the server name.

55.  def session(): String

    returns

      the session id.

56.  def subscribe(destination: String, headers: Map[String, String], handler: Handler[Frame], receiptHandler: Handler[Frame]): String

    Subscribes to the given destination.

    Subscribes to the given destination.

    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`).

    returns

      the subscription id, which can either be the destination or the id set in the headers.

57.  def subscribe(destination: String, headers: Map[String, String], handler: Handler[Frame]): String

    Subscribes to the given destination.

    Subscribes to the given destination.

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

58.  def subscribe(destination: String, handler: Handler[Frame], receiptHandler: Handler[Frame]): String

    Subscribes to the given destination.

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

    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`).

    returns

      the subscription id.

59.  def subscribe(destination: String, handler: Handler[Frame]): String

    Subscribes to the given destination.

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

    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 subscription id.

60.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
61.  def toString(): String
    Definition Classes
      AnyRef → Any
62.  def unsubscribe(destination: String, headers: Map[String, String], receiptHandler: Handler[Frame]): StompClientConnection

    Un-subscribes from the given destination.

    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.

    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

63.  def unsubscribe(destination: String, headers: Map[String, String]): StompClientConnection

    Un-subscribes from the given destination.

    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.

    destination

      the destination

    headers

      the headers

    returns

      the current StompClientConnection

64.  def unsubscribe(destination: String, receiptHandler: Handler[Frame]): StompClientConnection

    Un-subscribes from the given destination.

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

    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

65.  def unsubscribe(destination: String): StompClientConnection

    Un-subscribes from the given destination.

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

    destination

      the destination

    returns

      the current StompClientConnection

66.  def version(): String

    returns

      the STOMP protocol version negotiated with the server.

67.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
68.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
69.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
70.  def writingFrameHandler(handler: Handler[Frame]): StompClientConnection

    Configures a handler notified when a frame is going to be written on the wire.

    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 io.vertx.scala.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.

    handler

      the handler

    returns

      the current StompClientConnection

### Inherited from AnyRef

### Inherited from Any

### Ungrouped