Class StompClientConnection
- java.lang.Object
-
- io.vertx.mutiny.ext.stomp.StompClientConnection
-
public class StompClientConnection extends Object
Once a connection to the STOMP server has been made, client receives aStompClientConnection
, that let send and receive STOMP frames. NOTE: This class has been automatically generated from theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<StompClientConnection>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description StompClientConnection(io.vertx.ext.stomp.StompClientConnection delegate)
StompClientConnection(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame>
abort(String id)
Aborts a transaction.io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame>
abort(String id, Map<String,String> headers)
Aborts a transaction.io.vertx.ext.stomp.Frame
abortAndAwait(String id)
Blocking variant ofabort(String)
.io.vertx.ext.stomp.Frame
abortAndAwait(String id, Map<String,String> headers)
Blocking variant ofabort(String,Map)
.StompClientConnection
abortAndForget(String id)
Variant ofabort(String)
that ignores the result of the operation.StompClientConnection
abortAndForget(String id, Map<String,String> headers)
Variant ofabort(String,Map)
that ignores the result of the operation.io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame>
ack(String id)
Sends an acknowledgement for a specific message.io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame>
ack(String id, String txId)
Sends an acknowledgement for the given frame.io.vertx.ext.stomp.Frame
ackAndAwait(String id)
Blocking variant ofack(String)
.io.vertx.ext.stomp.Frame
ackAndAwait(String id, String txId)
Blocking variant ofack(String,String)
.StompClientConnection
ackAndForget(String id)
Variant ofack(String)
that ignores the result of the operation.StompClientConnection
ackAndForget(String id, String txId)
Variant ofack(String,String)
that ignores the result of the operation.io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame>
beginTX(String id)
Begins a transaction.io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame>
beginTX(String id, Map<String,String> headers)
Begins a transaction.io.vertx.ext.stomp.Frame
beginTXAndAwait(String id)
Blocking variant ofbeginTX(String)
.io.vertx.ext.stomp.Frame
beginTXAndAwait(String id, Map<String,String> headers)
Blocking variant ofbeginTX(String,Map)
.StompClientConnection
beginTXAndForget(String id)
Variant ofbeginTX(String)
that ignores the result of the operation.StompClientConnection
beginTXAndForget(String id, Map<String,String> headers)
Variant ofbeginTX(String,Map)
that ignores the result of the operation.void
close()
StompClientConnection
closeHandler(Consumer<StompClientConnection> handler)
io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame>
commit(String id)
Commits a transaction.io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame>
commit(String id, Map<String,String> headers)
Commits a transaction.io.vertx.ext.stomp.Frame
commitAndAwait(String id)
Blocking variant ofcommit(String)
.io.vertx.ext.stomp.Frame
commitAndAwait(String id, Map<String,String> headers)
Blocking variant ofcommit(String,Map)
.StompClientConnection
commitAndForget(String id)
Variant ofcommit(String)
that ignores the result of the operation.StompClientConnection
commitAndForget(String id, Map<String,String> headers)
Variant ofcommit(String,Map)
that ignores the result of the operation.StompClientConnection
connectionDroppedHandler(Consumer<StompClientConnection> handler)
io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame>
disconnect()
Disconnects the client.io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame>
disconnect(io.vertx.ext.stomp.Frame frame)
Disconnects the client.io.vertx.ext.stomp.Frame
disconnectAndAwait()
Blocking variant ofdisconnect()
.io.vertx.ext.stomp.Frame
disconnectAndAwait(io.vertx.ext.stomp.Frame frame)
Blocking variant ofdisconnect(Frame)
.StompClientConnection
disconnectAndForget()
Variant ofdisconnect()
that ignores the result of the operation.StompClientConnection
disconnectAndForget(io.vertx.ext.stomp.Frame frame)
Variant ofdisconnect(Frame)
that ignores the result of the operation.boolean
equals(Object o)
StompClientConnection
errorHandler(Consumer<io.vertx.ext.stomp.Frame> handler)
StompClientConnection
exceptionHandler(Consumer<Throwable> exceptionHandler)
io.vertx.ext.stomp.StompClientConnection
getDelegate()
int
hashCode()
boolean
isConnected()
io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame>
nack(String id)
Sends a non-acknowledgement for the given message.io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame>
nack(String id, String txId)
Sends a non-acknowledgement for the given frame.io.vertx.ext.stomp.Frame
nackAndAwait(String id)
Blocking variant ofnack(String)
.io.vertx.ext.stomp.Frame
nackAndAwait(String id, String txId)
Blocking variant ofnack(String,String)
.StompClientConnection
nackAndForget(String id)
Variant ofnack(String)
that ignores the result of the operation.StompClientConnection
nackAndForget(String id, String txId)
Variant ofnack(String,String)
that ignores the result of the operation.static StompClientConnection
newInstance(io.vertx.ext.stomp.StompClientConnection arg)
StompClientConnection
pingHandler(Consumer<StompClientConnection> handler)
StompClientConnection
receivedFrameHandler(Consumer<io.vertx.ext.stomp.Frame> handler)
io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame>
send(io.vertx.ext.stomp.Frame frame)
Sends the given frame to the server.io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame>
send(String destination, Buffer body)
Sends aSEND
frame to the server to the given destination.io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame>
send(String destination, Map<String,String> headers, Buffer body)
Sends aSEND
frame to the server to the given destination.io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame>
send(Map<String,String> headers, Buffer body)
Sends aSEND
frame to the server.io.vertx.ext.stomp.Frame
sendAndAwait(io.vertx.ext.stomp.Frame frame)
Blocking variant ofsend(Frame)
.io.vertx.ext.stomp.Frame
sendAndAwait(String destination, Buffer body)
Blocking variant ofsend(String,io.vertx.mutiny.core.buffer.Buffer)
.io.vertx.ext.stomp.Frame
sendAndAwait(String destination, Map<String,String> headers, Buffer body)
Blocking variant ofsend(String,Map,io.vertx.mutiny.core.buffer.Buffer)
.io.vertx.ext.stomp.Frame
sendAndAwait(Map<String,String> headers, Buffer body)
Blocking variant ofsend(Map,io.vertx.mutiny.core.buffer.Buffer)
.StompClientConnection
sendAndForget(io.vertx.ext.stomp.Frame frame)
Variant ofsend(Frame)
that ignores the result of the operation.StompClientConnection
sendAndForget(String destination, Buffer body)
Variant ofsend(String,io.vertx.mutiny.core.buffer.Buffer)
that ignores the result of the operation.StompClientConnection
sendAndForget(String destination, Map<String,String> headers, Buffer body)
Variant ofsend(String,Map,io.vertx.mutiny.core.buffer.Buffer)
that ignores the result of the operation.StompClientConnection
sendAndForget(Map<String,String> headers, Buffer body)
Variant ofsend(Map,io.vertx.mutiny.core.buffer.Buffer)
that ignores the result of the operation.String
server()
String
session()
io.smallrye.mutiny.Uni<String>
subscribe(String destination, Consumer<io.vertx.ext.stomp.Frame> handler)
Subscribes to the given destination.io.smallrye.mutiny.Uni<String>
subscribe(String destination, Map<String,String> headers, Consumer<io.vertx.ext.stomp.Frame> handler)
Subscribes to the given destination.String
subscribeAndAwait(String destination, Consumer<io.vertx.ext.stomp.Frame> handler)
Blocking variant ofsubscribe(String,Consumer)
.String
subscribeAndAwait(String destination, Map<String,String> headers, Consumer<io.vertx.ext.stomp.Frame> handler)
Blocking variant ofsubscribe(String,Map,Consumer)
.StompClientConnection
subscribeAndForget(String destination, Consumer<io.vertx.ext.stomp.Frame> handler)
Variant ofsubscribe(String,Consumer)
that ignores the result of the operation.StompClientConnection
subscribeAndForget(String destination, Map<String,String> headers, Consumer<io.vertx.ext.stomp.Frame> handler)
Variant ofsubscribe(String,Map,Consumer)
that ignores the result of the operation.String
toString()
io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame>
unsubscribe(String destination)
Un-subscribes from the given destination.io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame>
unsubscribe(String destination, Map<String,String> headers)
Un-subscribes from the given destination.io.vertx.ext.stomp.Frame
unsubscribeAndAwait(String destination)
Blocking variant ofunsubscribe(String)
.io.vertx.ext.stomp.Frame
unsubscribeAndAwait(String destination, Map<String,String> headers)
Blocking variant ofunsubscribe(String,Map)
.StompClientConnection
unsubscribeAndForget(String destination)
Variant ofunsubscribe(String)
that ignores the result of the operation.StompClientConnection
unsubscribeAndForget(String destination, Map<String,String> headers)
Variant ofunsubscribe(String,Map)
that ignores the result of the operation.String
version()
StompClientConnection
writingFrameHandler(Consumer<io.vertx.ext.stomp.Frame> handler)
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<StompClientConnection> __TYPE_ARG
-
-
Constructor Detail
-
StompClientConnection
public StompClientConnection(io.vertx.ext.stomp.StompClientConnection delegate)
-
StompClientConnection
public StompClientConnection(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.ext.stomp.StompClientConnection getDelegate()
-
session
public String session()
- Returns:
- the session id.
-
version
public String version()
- Returns:
- the STOMP protocol version negotiated with the server.
-
close
public void close()
-
server
public String server()
- Returns:
- the server name.
-
send
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> send(Map<String,String> headers, Buffer body)
Sends aSEND
frame to the server.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
headers
- the headers, must not benull
body
- the body, may benull
- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
sendAndAwait
public io.vertx.ext.stomp.Frame sendAndAwait(Map<String,String> headers, Buffer body)
Blocking variant ofsend(Map,io.vertx.mutiny.core.buffer.Buffer)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
headers
- the headers, must not benull
body
- the body, may benull
- Returns:
- the Frame instance produced by the operation.
-
sendAndForget
public StompClientConnection sendAndForget(Map<String,String> headers, Buffer body)
Variant ofsend(Map,io.vertx.mutiny.core.buffer.Buffer)
that ignores the result of the operation.This method subscribes on the result of
send(Map,io.vertx.mutiny.core.buffer.Buffer)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromsend(Map,io.vertx.mutiny.core.buffer.Buffer)
but you don't need to compose it with other operations.- Parameters:
headers
- the headers, must not benull
body
- the body, may benull
- Returns:
- the instance of StompClientConnection to chain method calls.
-
send
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> send(String destination, Buffer body)
Sends aSEND
frame to the server to the given destination. The message does not have any other header.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
destination
- the destination, must not benull
body
- the body, may benull
- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
sendAndAwait
public io.vertx.ext.stomp.Frame sendAndAwait(String destination, Buffer body)
Blocking variant ofsend(String,io.vertx.mutiny.core.buffer.Buffer)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
destination
- the destination, must not benull
body
- the body, may benull
- Returns:
- the Frame instance produced by the operation.
-
sendAndForget
public StompClientConnection sendAndForget(String destination, Buffer body)
Variant ofsend(String,io.vertx.mutiny.core.buffer.Buffer)
that ignores the result of the operation.This method subscribes on the result of
send(String,io.vertx.mutiny.core.buffer.Buffer)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromsend(String,io.vertx.mutiny.core.buffer.Buffer)
but you don't need to compose it with other operations.- Parameters:
destination
- the destination, must not benull
body
- the body, may benull
- Returns:
- the instance of StompClientConnection to chain method calls.
-
send
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> send(io.vertx.ext.stomp.Frame frame)
Sends the given frame to the server.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
frame
- the frame- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
sendAndAwait
public io.vertx.ext.stomp.Frame sendAndAwait(io.vertx.ext.stomp.Frame frame)
Blocking variant ofsend(Frame)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
frame
- the frame- Returns:
- the Frame instance produced by the operation.
-
sendAndForget
public StompClientConnection sendAndForget(io.vertx.ext.stomp.Frame frame)
Variant ofsend(Frame)
that ignores the result of the operation.This method subscribes on the result of
send(Frame)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromsend(Frame)
but you don't need to compose it with other operations.- Parameters:
frame
- the frame- Returns:
- the instance of StompClientConnection to chain method calls.
-
send
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> send(String destination, Map<String,String> headers, Buffer body)
Sends aSEND
frame to the server to the given destination.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
destination
- the destination, must not benull
headers
- the header. Thedestination
header is replaced by the value given to thedestination
parameterbody
- the body, may benull
- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
sendAndAwait
public io.vertx.ext.stomp.Frame sendAndAwait(String destination, Map<String,String> headers, Buffer body)
Blocking variant ofsend(String,Map,io.vertx.mutiny.core.buffer.Buffer)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
destination
- the destination, must not benull
headers
- the header. Thedestination
header is replaced by the value given to thedestination
parameterbody
- the body, may benull
- Returns:
- the Frame instance produced by the operation.
-
sendAndForget
public StompClientConnection sendAndForget(String destination, Map<String,String> headers, Buffer body)
Variant ofsend(String,Map,io.vertx.mutiny.core.buffer.Buffer)
that ignores the result of the operation.This method subscribes on the result of
send(String,Map,io.vertx.mutiny.core.buffer.Buffer)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromsend(String,Map,io.vertx.mutiny.core.buffer.Buffer)
but you don't need to compose it with other operations.- Parameters:
destination
- the destination, must not benull
headers
- the header. Thedestination
header is replaced by the value given to thedestination
parameterbody
- the body, may benull
- Returns:
- the instance of StompClientConnection to chain method calls.
-
subscribe
@CheckReturnValue public io.smallrye.mutiny.Uni<String> subscribe(String destination, Consumer<io.vertx.ext.stomp.Frame> handler)
Subscribes to the given destination. This destination is used as subscription id.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
destination
- the destination, must not benull
handler
- the handler invoked when a message is received on the given destination. Must not benull
.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
subscribeAndAwait
public String subscribeAndAwait(String destination, Consumer<io.vertx.ext.stomp.Frame> handler)
Blocking variant ofsubscribe(String,Consumer)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
destination
- the destination, must not benull
handler
- the handler invoked when a message is received on the given destination. Must not benull
.- Returns:
- the String instance produced by the operation.
-
subscribeAndForget
public StompClientConnection subscribeAndForget(String destination, Consumer<io.vertx.ext.stomp.Frame> handler)
Variant ofsubscribe(String,Consumer)
that ignores the result of the operation.This method subscribes on the result of
subscribe(String,Consumer)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromsubscribe(String,Consumer)
but you don't need to compose it with other operations.- Parameters:
destination
- the destination, must not benull
handler
- the handler invoked when a message is received on the given destination. Must not benull
.- Returns:
- the instance of StompClientConnection to chain method calls.
-
subscribe
@CheckReturnValue public io.smallrye.mutiny.Uni<String> subscribe(String destination, Map<String,String> headers, Consumer<io.vertx.ext.stomp.Frame> handler)
Subscribes to the given destination.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
destination
- the destination, must not benull
headers
- the headers to configure the subscription. It may contain theack
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 benull
.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
subscribeAndAwait
public String subscribeAndAwait(String destination, Map<String,String> headers, Consumer<io.vertx.ext.stomp.Frame> handler)
Blocking variant ofsubscribe(String,Map,Consumer)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
destination
- the destination, must not benull
headers
- the headers to configure the subscription. It may contain theack
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 benull
.- Returns:
- the String instance produced by the operation.
-
subscribeAndForget
public StompClientConnection subscribeAndForget(String destination, Map<String,String> headers, Consumer<io.vertx.ext.stomp.Frame> handler)
Variant ofsubscribe(String,Map,Consumer)
that ignores the result of the operation.This method subscribes on the result of
subscribe(String,Map,Consumer)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromsubscribe(String,Map,Consumer)
but you don't need to compose it with other operations.- Parameters:
destination
- the destination, must not benull
headers
- the headers to configure the subscription. It may contain theack
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 benull
.- Returns:
- the instance of StompClientConnection to chain method calls.
-
unsubscribe
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> unsubscribe(String destination)
Un-subscribes from the given destination. This method only works if the subscription did not specifies a subscription id (using theid
header).Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
destination
- the destination- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
unsubscribeAndAwait
public io.vertx.ext.stomp.Frame unsubscribeAndAwait(String destination)
Blocking variant ofunsubscribe(String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
destination
- the destination- Returns:
- the Frame instance produced by the operation.
-
unsubscribeAndForget
public StompClientConnection unsubscribeAndForget(String destination)
Variant ofunsubscribe(String)
that ignores the result of the operation.This method subscribes on the result of
unsubscribe(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromunsubscribe(String)
but you don't need to compose it with other operations.- Parameters:
destination
- the destination- Returns:
- the instance of StompClientConnection to chain method calls.
-
unsubscribe
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> unsubscribe(String destination, Map<String,String> headers)
Un-subscribes from the given destination. This method computes the subscription id as follows. If the given headers contains theid
header, the header value is used. Otherwise the destination is used.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
destination
- the destinationheaders
- the headers- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
unsubscribeAndAwait
public io.vertx.ext.stomp.Frame unsubscribeAndAwait(String destination, Map<String,String> headers)
Blocking variant ofunsubscribe(String,Map)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
destination
- the destinationheaders
- the headers- Returns:
- the Frame instance produced by the operation.
-
unsubscribeAndForget
public StompClientConnection unsubscribeAndForget(String destination, Map<String,String> headers)
Variant ofunsubscribe(String,Map)
that ignores the result of the operation.This method subscribes on the result of
unsubscribe(String,Map)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromunsubscribe(String,Map)
but you don't need to compose it with other operations.- Parameters:
destination
- the destinationheaders
- the headers- Returns:
- the instance of StompClientConnection to chain method calls.
-
errorHandler
public StompClientConnection errorHandler(Consumer<io.vertx.ext.stomp.Frame> handler)
- Parameters:
handler
- the handler- Returns:
-
closeHandler
public StompClientConnection closeHandler(Consumer<StompClientConnection> handler)
- Parameters:
handler
- the handler- Returns:
-
connectionDroppedHandler
public StompClientConnection connectionDroppedHandler(Consumer<StompClientConnection> handler)
- Parameters:
handler
- the handler- Returns:
-
pingHandler
public StompClientConnection pingHandler(Consumer<StompClientConnection> handler)
- Parameters:
handler
- the handler- Returns:
-
beginTX
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> beginTX(String id)
Begins a transaction.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
id
- the transaction id, must not benull
- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
beginTXAndAwait
public io.vertx.ext.stomp.Frame beginTXAndAwait(String id)
Blocking variant ofbeginTX(String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
id
- the transaction id, must not benull
- Returns:
- the Frame instance produced by the operation.
-
beginTXAndForget
public StompClientConnection beginTXAndForget(String id)
Variant ofbeginTX(String)
that ignores the result of the operation.This method subscribes on the result of
beginTX(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation frombeginTX(String)
but you don't need to compose it with other operations.- Parameters:
id
- the transaction id, must not benull
- Returns:
- the instance of StompClientConnection to chain method calls.
-
beginTX
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> beginTX(String id, Map<String,String> headers)
Begins a transaction.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
id
- the transaction id, must not benull
headers
- additional headers to send to the server. Thetransaction
header is replaced by the value passed in the @{code id} parameter- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
beginTXAndAwait
public io.vertx.ext.stomp.Frame beginTXAndAwait(String id, Map<String,String> headers)
Blocking variant ofbeginTX(String,Map)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
id
- the transaction id, must not benull
headers
- additional headers to send to the server. Thetransaction
header is replaced by the value passed in the @{code id} parameter- Returns:
- the Frame instance produced by the operation.
-
beginTXAndForget
public StompClientConnection beginTXAndForget(String id, Map<String,String> headers)
Variant ofbeginTX(String,Map)
that ignores the result of the operation.This method subscribes on the result of
beginTX(String,Map)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation frombeginTX(String,Map)
but you don't need to compose it with other operations.- Parameters:
id
- the transaction id, must not benull
headers
- additional headers to send to the server. Thetransaction
header is replaced by the value passed in the @{code id} parameter- Returns:
- the instance of StompClientConnection to chain method calls.
-
commit
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> commit(String id)
Commits a transaction.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
id
- the transaction id, must not benull
- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
commitAndAwait
public io.vertx.ext.stomp.Frame commitAndAwait(String id)
Blocking variant ofcommit(String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
id
- the transaction id, must not benull
- Returns:
- the Frame instance produced by the operation.
-
commitAndForget
public StompClientConnection commitAndForget(String id)
Variant ofcommit(String)
that ignores the result of the operation.This method subscribes on the result of
commit(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromcommit(String)
but you don't need to compose it with other operations.- Parameters:
id
- the transaction id, must not benull
- Returns:
- the instance of StompClientConnection to chain method calls.
-
commit
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> commit(String id, Map<String,String> headers)
Commits a transaction.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
id
- the transaction id, must not benull
headers
- additional headers to send to the server. Thetransaction
header is replaced by the value passed in the @{code id} parameter- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
commitAndAwait
public io.vertx.ext.stomp.Frame commitAndAwait(String id, Map<String,String> headers)
Blocking variant ofcommit(String,Map)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
id
- the transaction id, must not benull
headers
- additional headers to send to the server. Thetransaction
header is replaced by the value passed in the @{code id} parameter- Returns:
- the Frame instance produced by the operation.
-
commitAndForget
public StompClientConnection commitAndForget(String id, Map<String,String> headers)
Variant ofcommit(String,Map)
that ignores the result of the operation.This method subscribes on the result of
commit(String,Map)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromcommit(String,Map)
but you don't need to compose it with other operations.- Parameters:
id
- the transaction id, must not benull
headers
- additional headers to send to the server. Thetransaction
header is replaced by the value passed in the @{code id} parameter- Returns:
- the instance of StompClientConnection to chain method calls.
-
abort
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> abort(String id)
Aborts a transaction.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
id
- the transaction id, must not benull
- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
abortAndAwait
public io.vertx.ext.stomp.Frame abortAndAwait(String id)
Blocking variant ofabort(String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
id
- the transaction id, must not benull
- Returns:
- the Frame instance produced by the operation.
-
abortAndForget
public StompClientConnection abortAndForget(String id)
Variant ofabort(String)
that ignores the result of the operation.This method subscribes on the result of
abort(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromabort(String)
but you don't need to compose it with other operations.- Parameters:
id
- the transaction id, must not benull
- Returns:
- the instance of StompClientConnection to chain method calls.
-
abort
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> abort(String id, Map<String,String> headers)
Aborts a transaction.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
id
- the transaction id, must not benull
headers
- additional headers to send to the server. Thetransaction
header is replaced by the value passed in the @{code id} parameter- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
abortAndAwait
public io.vertx.ext.stomp.Frame abortAndAwait(String id, Map<String,String> headers)
Blocking variant ofabort(String,Map)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
id
- the transaction id, must not benull
headers
- additional headers to send to the server. Thetransaction
header is replaced by the value passed in the @{code id} parameter- Returns:
- the Frame instance produced by the operation.
-
abortAndForget
public StompClientConnection abortAndForget(String id, Map<String,String> headers)
Variant ofabort(String,Map)
that ignores the result of the operation.This method subscribes on the result of
abort(String,Map)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromabort(String,Map)
but you don't need to compose it with other operations.- Parameters:
id
- the transaction id, must not benull
headers
- additional headers to send to the server. Thetransaction
header is replaced by the value passed in the @{code id} parameter- Returns:
- the instance of StompClientConnection to chain method calls.
-
disconnect
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> disconnect()
Disconnects the client. Unlike theclose()
method, this method send theDISCONNECT
frame to the server.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
disconnectAndAwait
public io.vertx.ext.stomp.Frame disconnectAndAwait()
Blocking variant ofdisconnect()
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Returns:
- the Frame instance produced by the operation.
-
disconnectAndForget
public StompClientConnection disconnectAndForget()
Variant ofdisconnect()
that ignores the result of the operation.This method subscribes on the result of
disconnect()
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromdisconnect()
but you don't need to compose it with other operations.- Returns:
- the instance of StompClientConnection to chain method calls.
-
disconnect
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> disconnect(io.vertx.ext.stomp.Frame frame)
Disconnects the client. Unlike theclose()
method, this method send theDISCONNECT
frame to the server. This method lets you customize theDISCONNECT
frame.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
frame
- theDISCONNECT
frame.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
disconnectAndAwait
public io.vertx.ext.stomp.Frame disconnectAndAwait(io.vertx.ext.stomp.Frame frame)
Blocking variant ofdisconnect(Frame)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
frame
- theDISCONNECT
frame.- Returns:
- the Frame instance produced by the operation.
-
disconnectAndForget
public StompClientConnection disconnectAndForget(io.vertx.ext.stomp.Frame frame)
Variant ofdisconnect(Frame)
that ignores the result of the operation.This method subscribes on the result of
disconnect(Frame)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromdisconnect(Frame)
but you don't need to compose it with other operations.- Parameters:
frame
- theDISCONNECT
frame.- Returns:
- the instance of StompClientConnection to chain method calls.
-
ack
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> ack(String id)
Sends an acknowledgement for a specific message. It means that the message has been handled and processed by the client. Theid
parameter is the message id received in the frame.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
id
- the message id of the message to acknowledge- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
ackAndAwait
public io.vertx.ext.stomp.Frame ackAndAwait(String id)
Blocking variant ofack(String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
id
- the message id of the message to acknowledge- Returns:
- the Frame instance produced by the operation.
-
ackAndForget
public StompClientConnection ackAndForget(String id)
Variant ofack(String)
that ignores the result of the operation.This method subscribes on the result of
ack(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromack(String)
but you don't need to compose it with other operations.- Parameters:
id
- the message id of the message to acknowledge- Returns:
- the instance of StompClientConnection to chain method calls.
-
nack
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> nack(String id)
Sends a non-acknowledgement for the given message. It means that the message has not been handled by the client. Theid
parameter is the message id received in the frame.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
id
- the message id of the message to acknowledge- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
nackAndAwait
public io.vertx.ext.stomp.Frame nackAndAwait(String id)
Blocking variant ofnack(String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
id
- the message id of the message to acknowledge- Returns:
- the Frame instance produced by the operation.
-
nackAndForget
public StompClientConnection nackAndForget(String id)
Variant ofnack(String)
that ignores the result of the operation.This method subscribes on the result of
nack(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromnack(String)
but you don't need to compose it with other operations.- Parameters:
id
- the message id of the message to acknowledge- Returns:
- the instance of StompClientConnection to chain method calls.
-
ack
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> ack(String id, String txId)
Sends an acknowledgement for the given frame. It means that the frame has been handled and processed by the client. The sent acknowledgement is part of the transaction identified by the given id.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
id
- the message id of the message to acknowledgetxId
- the transaction id- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
ackAndAwait
public io.vertx.ext.stomp.Frame ackAndAwait(String id, String txId)
Blocking variant ofack(String,String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
id
- the message id of the message to acknowledgetxId
- the transaction id- Returns:
- the Frame instance produced by the operation.
-
ackAndForget
public StompClientConnection ackAndForget(String id, String txId)
Variant ofack(String,String)
that ignores the result of the operation.This method subscribes on the result of
ack(String,String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromack(String,String)
but you don't need to compose it with other operations.- Parameters:
id
- the message id of the message to acknowledgetxId
- the transaction id- Returns:
- the instance of StompClientConnection to chain method calls.
-
nack
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame> nack(String id, String txId)
Sends a non-acknowledgement for the given frame. It means that the frame has not been handled by the client. The sent non-acknowledgement is part of the transaction identified by the given id.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
id
- the message id of the message to acknowledgetxId
- the transaction id- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
nackAndAwait
public io.vertx.ext.stomp.Frame nackAndAwait(String id, String txId)
Blocking variant ofnack(String,String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
id
- the message id of the message to acknowledgetxId
- the transaction id- Returns:
- the Frame instance produced by the operation.
-
nackAndForget
public StompClientConnection nackAndForget(String id, String txId)
Variant ofnack(String,String)
that ignores the result of the operation.This method subscribes on the result of
nack(String,String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromnack(String,String)
but you don't need to compose it with other operations.- Parameters:
id
- the message id of the message to acknowledgetxId
- the transaction id- Returns:
- the instance of StompClientConnection to chain method calls.
-
receivedFrameHandler
public StompClientConnection receivedFrameHandler(Consumer<io.vertx.ext.stomp.Frame> handler)
- Parameters:
handler
- the handler- Returns:
-
writingFrameHandler
public StompClientConnection writingFrameHandler(Consumer<io.vertx.ext.stomp.Frame> handler)
- Parameters:
handler
- the handler- Returns:
-
exceptionHandler
public StompClientConnection exceptionHandler(Consumer<Throwable> exceptionHandler)
- Parameters:
exceptionHandler
- the handler- Returns:
-
isConnected
public boolean isConnected()
- Returns:
true
if the connection is established,false
otherwise
-
newInstance
public static StompClientConnection newInstance(io.vertx.ext.stomp.StompClientConnection arg)
-
-