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.
- Alphabetic
- By Inheritance
- StompClientConnection
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new StompClientConnection(_asJava: AnyRef)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
abort(id: String, headers: Map[String, String], receiptHandler: Handler[Frame]): StompClientConnection
Aborts a transaction.
Aborts a transaction. * @param 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 idparameter
- 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
-
def
abort(id: String, headers: Map[String, String]): StompClientConnection
Aborts a transaction.
Aborts a transaction. * @param 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 idparameter
- returns
the current StompClientConnection
-
def
abort(id: String, receiptHandler: Handler[Frame]): StompClientConnection
Aborts a transaction.
Aborts a transaction. * @param 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
-
def
abort(id: String): StompClientConnection
Aborts a transaction.
Aborts a transaction. * @param id the transaction id, must not be
null
- returns
the current StompClientConnection
-
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. * @param 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
-
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. * @param id the message id of the message to acknowledge
- txId
the transaction id
- returns
the current StompClientConnection
-
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. * @param 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
-
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. * @param id the message id of the message to acknowledge- returns
the current StompClientConnection
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava: AnyRef
-
def
beginTX(id: String, headers: Map[String, String], receiptHandler: Handler[Frame]): StompClientConnection
Begins a transaction.
Begins a transaction. * @param 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 idparameter
- 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
-
def
beginTX(id: String, headers: Map[String, String]): StompClientConnection
Begins a transaction.
Begins a transaction. * @param 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 idparameter
- returns
the current StompClientConnection
-
def
beginTX(id: String): StompClientConnection
Begins a transaction.
Begins a transaction. * @param id the transaction id, must not be
null
- returns
the current StompClientConnection
-
def
beginTX(id: String, receiptHandler: Handler[Frame]): StompClientConnection
Begins a transaction.
Begins a transaction. * @param 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
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
close(): Unit
Closes the connection without sending the
DISCONNECT
frame. -
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. * @param handler the handler
- returns
the current StompClientConnection
-
def
commit(id: String, headers: Map[String, String], receiptHandler: Handler[Frame]): StompClientConnection
Commits a transaction.
Commits a transaction. * @param 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 idparameter
- 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
-
def
commit(id: String, headers: Map[String, String]): StompClientConnection
Commits a transaction.
Commits a transaction. * @param 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 idparameter
- returns
the current StompClientConnection
-
def
commit(id: String, receiptHandler: Handler[Frame]): StompClientConnection
Commits a transaction.
Commits a transaction. * @param 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
-
def
commit(id: String): StompClientConnection
Commits a transaction.
Commits a transaction. * @param id the transaction id, must not be
null
- returns
the current StompClientConnection
-
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. * @param handler the handler- returns
the current StompClientConnection receiving the dropped connection.
-
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 theDISCONNECT
frame. * @param frame theDISCONNECT
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
-
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 theDISCONNECT
frame. * @param frame theDISCONNECT
frame. see Frame- returns
the current StompClientConnection
-
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. * @param receiptHandler the handler invoked when theRECEIPT
frame associated with the disconnection has been processed by the server. The handler receives the sent frame (DISCONNECT
).- returns
the current StompClientConnection
-
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. * @return the current StompClientConnection -
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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 theERROR
frame and a reference on the io.vertx.scala.ext.stomp.StompClientConnection. * @param handler the handler- returns
the current StompClientConnection
-
def
exceptionHandler(exceptionHandler: Handler[Throwable]): StompClientConnection
Configures the exception handler notified upon TCP-level errors.
Configures the exception handler notified upon TCP-level errors. * @param exceptionHandler the handler
- returns
the current StompClientConnection
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
isConnected(): Boolean
Returns whether or not the
CONNECTED
frame has been receive meaning that the Stomp connection is established.Returns whether or not the
CONNECTED
frame has been receive meaning that the Stomp connection is established. * @returntrue
if the connection is established,false
otherwise -
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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. * @param 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
-
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. * @param id the message id of the message to acknowledge
- txId
the transaction id
- returns
the current StompClientConnection
-
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. * @param 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
-
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. * @param id the message id of the message to acknowledge- returns
the current StompClientConnection
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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. * @param handler the handler
- returns
the current StompClientConnection
-
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. * @param handler the handler- returns
the current StompClientConnection
-
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. * @param destination the destination, must not benull
- headers
the header. The
destination
header is replaced by the value given to thedestination
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
-
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. * @param destination the destination, must not benull
- headers
the header. The
destination
header is replaced by the value given to thedestination
parameter- body
the body, may be
null
- returns
the current StompClientConnection
-
def
send(frame: Frame, receiptHandler: Handler[Frame]): StompClientConnection
Sends the given frame to the server.
Sends the given frame to the server. * @param 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.- returns
the current StompClientConnection
-
def
send(frame: Frame): StompClientConnection
Sends the given frame to the server.
Sends the given frame to the server. * @param frame the frame see Frame
- returns
the current StompClientConnection
-
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. * @param destination the destination, must not benull
- 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
-
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. * @param destination the destination, must not benull
- body
the body, may be
null
- returns
the current StompClientConnection
-
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. * @param headers the headers, must not benull
- 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
-
def
send(headers: Map[String, String], body: Buffer): StompClientConnection
Sends a
SEND
frame to the server.Sends a
SEND
frame to the server. * @param headers the headers, must not benull
- body
the body, may be
null
- returns
the current StompClientConnection
-
def
server(): String
- returns
the server name.
-
def
session(): String
- returns
the session id.
-
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. * @param 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 theid
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.
-
def
subscribe(destination: String, headers: Map[String, String], handler: Handler[Frame]): String
Subscribes to the given destination.
Subscribes to the given destination. * @param 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 theid
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.
-
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. * @param 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.
-
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. * @param 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.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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. * @param 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
-
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. * @param destination the destination- headers
the headers
- returns
the current StompClientConnection
-
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). * @param 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
-
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). * @param destination the destination- returns
the current StompClientConnection
-
def
version(): String
- returns
the STOMP protocol version negotiated with the server.
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
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. * @param handler the handler
- returns
the current StompClientConnection