public class StompClientConnection extends Object
StompClientConnection, that let
send and receive STOMP frames.
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.| Modifier and Type | Field and Description |
|---|---|
static TypeArg<StompClientConnection> |
__TYPE_ARG |
| Constructor and Description |
|---|
StompClientConnection(Object delegate) |
StompClientConnection(StompClientConnection delegate) |
| Modifier and Type | Method and Description |
|---|---|
io.reactivex.rxjava3.core.Single<Frame> |
abort(String id)
Aborts a transaction.
|
io.reactivex.rxjava3.core.Single<Frame> |
abort(String id,
Map<String,String> headers)
Aborts a transaction.
|
io.reactivex.rxjava3.core.Single<Frame> |
ack(String id)
Sends an acknowledgement for a specific message.
|
io.reactivex.rxjava3.core.Single<Frame> |
ack(String id,
String txId)
Sends an acknowledgement for the given frame.
|
io.reactivex.rxjava3.core.Single<Frame> |
beginTX(String id)
Begins a transaction.
|
io.reactivex.rxjava3.core.Single<Frame> |
beginTX(String id,
Map<String,String> headers)
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.
|
io.reactivex.rxjava3.core.Single<Frame> |
commit(String id)
Commits a transaction.
|
io.reactivex.rxjava3.core.Single<Frame> |
commit(String id,
Map<String,String> headers)
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. |
io.reactivex.rxjava3.core.Single<Frame> |
disconnect()
Disconnects the client.
|
io.reactivex.rxjava3.core.Single<Frame> |
disconnect(Frame frame)
Disconnects the client.
|
boolean |
equals(Object o) |
StompClientConnection |
errorHandler(io.vertx.core.Handler<Frame> handler)
Sets a handler notified when an
ERROR frame is received by the client. |
StompClientConnection |
exceptionHandler(io.vertx.core.Handler<Throwable> exceptionHandler)
Configures the exception handler notified upon TCP-level errors.
|
StompClientConnection |
getDelegate() |
int |
hashCode() |
boolean |
isConnected()
Returns whether or not the `CONNECTED` frame has been receive meaning that the Stomp connection is established.
|
io.reactivex.rxjava3.core.Single<Frame> |
nack(String id)
Sends a non-acknowledgement for the given message.
|
io.reactivex.rxjava3.core.Single<Frame> |
nack(String id,
String txId)
Sends a non-acknowledgement for the given frame.
|
static StompClientConnection |
newInstance(StompClientConnection arg) |
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<Frame> handler)
Configures a received handler that get notified when a STOMP frame is received by the client.
|
io.reactivex.rxjava3.core.Single<Frame> |
rxAbort(String id)
Aborts a transaction.
|
io.reactivex.rxjava3.core.Single<Frame> |
rxAbort(String id,
Map<String,String> headers)
Aborts a transaction.
|
io.reactivex.rxjava3.core.Single<Frame> |
rxAck(String id)
Sends an acknowledgement for a specific message.
|
io.reactivex.rxjava3.core.Single<Frame> |
rxAck(String id,
String txId)
Sends an acknowledgement for the given frame.
|
io.reactivex.rxjava3.core.Single<Frame> |
rxBeginTX(String id)
Begins a transaction.
|
io.reactivex.rxjava3.core.Single<Frame> |
rxBeginTX(String id,
Map<String,String> headers)
Begins a transaction.
|
io.reactivex.rxjava3.core.Single<Frame> |
rxCommit(String id)
Commits a transaction.
|
io.reactivex.rxjava3.core.Single<Frame> |
rxCommit(String id,
Map<String,String> headers)
Commits a transaction.
|
io.reactivex.rxjava3.core.Single<Frame> |
rxDisconnect()
Disconnects the client.
|
io.reactivex.rxjava3.core.Single<Frame> |
rxDisconnect(Frame frame)
Disconnects the client.
|
io.reactivex.rxjava3.core.Single<Frame> |
rxNack(String id)
Sends a non-acknowledgement for the given message.
|
io.reactivex.rxjava3.core.Single<Frame> |
rxNack(String id,
String txId)
Sends a non-acknowledgement for the given frame.
|
io.reactivex.rxjava3.core.Single<Frame> |
rxSend(Frame frame)
Sends the given frame to the server.
|
io.reactivex.rxjava3.core.Single<Frame> |
rxSend(Map<String,String> headers,
Buffer body)
Sends a
SEND frame to the server. |
io.reactivex.rxjava3.core.Single<Frame> |
rxSend(String destination,
Buffer body)
Sends a
SEND frame to the server to the given destination. |
io.reactivex.rxjava3.core.Single<Frame> |
rxSend(String destination,
Map<String,String> headers,
Buffer body)
Sends a
SEND frame to the server to the given destination. |
io.reactivex.rxjava3.core.Single<String> |
rxSubscribe(String destination,
io.vertx.core.Handler<Frame> handler)
Subscribes to the given destination.
|
io.reactivex.rxjava3.core.Single<String> |
rxSubscribe(String destination,
Map<String,String> headers,
io.vertx.core.Handler<Frame> handler)
Subscribes to the given destination.
|
io.reactivex.rxjava3.core.Single<Frame> |
rxUnsubscribe(String destination)
Un-subscribes from the given destination.
|
io.reactivex.rxjava3.core.Single<Frame> |
rxUnsubscribe(String destination,
Map<String,String> headers)
Un-subscribes from the given destination.
|
io.reactivex.rxjava3.core.Single<Frame> |
send(Frame frame)
Sends the given frame to the server.
|
io.reactivex.rxjava3.core.Single<Frame> |
send(Map<String,String> headers,
Buffer body)
Sends a
SEND frame to the server. |
io.reactivex.rxjava3.core.Single<Frame> |
send(String destination,
Buffer body)
Sends a
SEND frame to the server to the given destination. |
io.reactivex.rxjava3.core.Single<Frame> |
send(String destination,
Map<String,String> headers,
Buffer body)
Sends a
SEND frame to the server to the given destination. |
String |
server() |
String |
session() |
io.reactivex.rxjava3.core.Single<String> |
subscribe(String destination,
io.vertx.core.Handler<Frame> handler)
Subscribes to the given destination.
|
io.reactivex.rxjava3.core.Single<String> |
subscribe(String destination,
Map<String,String> headers,
io.vertx.core.Handler<Frame> handler)
Subscribes to the given destination.
|
String |
toString() |
io.reactivex.rxjava3.core.Single<Frame> |
unsubscribe(String destination)
Un-subscribes from the given destination.
|
io.reactivex.rxjava3.core.Single<Frame> |
unsubscribe(String destination,
Map<String,String> headers)
Un-subscribes from the given destination.
|
String |
version() |
StompClientConnection |
writingFrameHandler(io.vertx.core.Handler<Frame> handler)
Configures a handler notified when a frame is going to be written on the wire.
|
public static final TypeArg<StompClientConnection> __TYPE_ARG
public StompClientConnection(StompClientConnection delegate)
public StompClientConnection(Object delegate)
public StompClientConnection getDelegate()
public String session()
public String version()
public void close()
DISCONNECT frame.public String server()
public io.reactivex.rxjava3.core.Single<Frame> send(Map<String,String> headers, Buffer body)
SEND frame to the server.headers - the headers, must not be nullbody - the body, may be nullStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> rxSend(Map<String,String> headers, Buffer body)
SEND frame to the server.headers - the headers, must not be nullbody - the body, may be nullStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> send(String destination, Buffer body)
SEND frame to the server to the given destination. The message does not have any other header.destination - the destination, must not be nullbody - the body, may be nullStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> rxSend(String destination, Buffer body)
SEND frame to the server to the given destination. The message does not have any other header.destination - the destination, must not be nullbody - the body, may be nullStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> send(Frame frame)
frame - the frameStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> rxSend(Frame frame)
frame - the frameStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> send(String destination, Map<String,String> headers, Buffer body)
SEND frame to the server to the given destination.destination - the destination, must not be nullheaders - the header. The destination header is replaced by the value given to the destination parameterbody - the body, may be nullStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> rxSend(String destination, Map<String,String> headers, Buffer body)
SEND frame to the server to the given destination.destination - the destination, must not be nullheaders - the header. The destination header is replaced by the value given to the destination parameterbody - the body, may be nullStompClientConnectionpublic io.reactivex.rxjava3.core.Single<String> subscribe(String destination, io.vertx.core.Handler<Frame> handler)
destination - the destination, must not be nullhandler - the handler invoked when a message is received on the given destination. Must not be null.StompClientConnectionpublic io.reactivex.rxjava3.core.Single<String> rxSubscribe(String destination, io.vertx.core.Handler<Frame> handler)
destination - the destination, must not be nullhandler - the handler invoked when a message is received on the given destination. Must not be null.StompClientConnectionpublic io.reactivex.rxjava3.core.Single<String> subscribe(String destination, Map<String,String> headers, io.vertx.core.Handler<Frame> handler)
destination - the destination, must not be nullheaders - 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.StompClientConnectionpublic io.reactivex.rxjava3.core.Single<String> rxSubscribe(String destination, Map<String,String> headers, io.vertx.core.Handler<Frame> handler)
destination - the destination, must not be nullheaders - 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.StompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> unsubscribe(String destination)
id header).destination - the destinationStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> rxUnsubscribe(String destination)
id header).destination - the destinationStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> unsubscribe(String destination, Map<String,String> headers)
id header, the header value is used. Otherwise the destination is used.destination - the destinationheaders - the headersStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> rxUnsubscribe(String destination, Map<String,String> headers)
id header, the header value is used. Otherwise the destination is used.destination - the destinationheaders - the headersStompClientConnectionpublic StompClientConnection errorHandler(io.vertx.core.Handler<Frame> handler)
ERROR frame is received by the client. The handler receives the ERROR frame and a reference on the StompClientConnection.handler - the handlerStompClientConnectionpublic StompClientConnection closeHandler(io.vertx.core.Handler<StompClientConnection> handler)
handler - the handlerStompClientConnectionpublic StompClientConnection connectionDroppedHandler(io.vertx.core.Handler<StompClientConnection> handler)
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 handlerStompClientConnection receiving the dropped connection.public StompClientConnection pingHandler(io.vertx.core.Handler<StompClientConnection> handler)
handler - the handlerStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> beginTX(String id)
id - the transaction id, must not be nullStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> rxBeginTX(String id)
id - the transaction id, must not be nullStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> beginTX(String id, Map<String,String> headers)
id - the transaction id, must not be nullheaders - additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameterStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> rxBeginTX(String id, Map<String,String> headers)
id - the transaction id, must not be nullheaders - additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameterStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> commit(String id)
id - the transaction id, must not be nullStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> rxCommit(String id)
id - the transaction id, must not be nullStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> commit(String id, Map<String,String> headers)
id - the transaction id, must not be nullheaders - additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameterStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> rxCommit(String id, Map<String,String> headers)
id - the transaction id, must not be nullheaders - additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameterStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> abort(String id)
id - the transaction id, must not be nullStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> rxAbort(String id)
id - the transaction id, must not be nullStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> abort(String id, Map<String,String> headers)
id - the transaction id, must not be nullheaders - additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameterStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> rxAbort(String id, Map<String,String> headers)
id - the transaction id, must not be nullheaders - additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameterStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> disconnect()
close() method, this method send the DISCONNECT frame to the
server.StompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> rxDisconnect()
close() method, this method send the DISCONNECT frame to the
server.StompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> disconnect(Frame frame)
close() method, this method send the DISCONNECT frame to the
server. This method lets you customize the DISCONNECT frame.frame - the DISCONNECT frame.RECEIPT frame associated with the sent frame has been receivedpublic io.reactivex.rxjava3.core.Single<Frame> rxDisconnect(Frame frame)
close() method, this method send the DISCONNECT frame to the
server. This method lets you customize the DISCONNECT frame.frame - the DISCONNECT frame.RECEIPT frame associated with the sent frame has been receivedpublic io.reactivex.rxjava3.core.Single<Frame> ack(String id)
id parameter is the message id received in the frame.id - the message id of the message to acknowledgeStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> rxAck(String id)
id parameter is the message id received in the frame.id - the message id of the message to acknowledgeStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> nack(String id)
id parameter is the message id received in the frame.id - the message id of the message to acknowledgeStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> rxNack(String id)
id parameter is the message id received in the frame.id - the message id of the message to acknowledgeStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> ack(String id, String txId)
id - the message id of the message to acknowledgetxId - the transaction idStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> rxAck(String id, String txId)
id - the message id of the message to acknowledgetxId - the transaction idStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> nack(String id, String txId)
id - the message id of the message to acknowledgetxId - the transaction idStompClientConnectionpublic io.reactivex.rxjava3.core.Single<Frame> rxNack(String id, String txId)
id - the message id of the message to acknowledgetxId - the transaction idStompClientConnectionpublic StompClientConnection receivedFrameHandler(io.vertx.core.Handler<Frame> handler)
Unlike StompClient.receivedFrameHandler(io.vertx.core.Handler<io.vertx.ext.stomp.Frame>), 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.
handler - the handlerStompClientConnectionpublic StompClientConnection writingFrameHandler(io.vertx.core.Handler<Frame> handler)
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.
handler - the handlerStompClientConnectionpublic StompClientConnection exceptionHandler(io.vertx.core.Handler<Throwable> exceptionHandler)
exceptionHandler - the handlerStompClientConnectionpublic boolean isConnected()
true if the connection is established, false otherwisepublic static StompClientConnection newInstance(StompClientConnection arg)
Copyright © 2022 Eclipse. All rights reserved.