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 theoriginalnon 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.FrameabortAndAwait(String id)Blocking variant ofabort(String).io.vertx.ext.stomp.FrameabortAndAwait(String id, Map<String,String> headers)Blocking variant ofabort(String,Map).StompClientConnectionabortAndForget(String id)Variant ofabort(String)that ignores the result of the operation.StompClientConnectionabortAndForget(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.FrameackAndAwait(String id)Blocking variant ofack(String).io.vertx.ext.stomp.FrameackAndAwait(String id, String txId)Blocking variant ofack(String,String).StompClientConnectionackAndForget(String id)Variant ofack(String)that ignores the result of the operation.StompClientConnectionackAndForget(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.FramebeginTXAndAwait(String id)Blocking variant ofbeginTX(String).io.vertx.ext.stomp.FramebeginTXAndAwait(String id, Map<String,String> headers)Blocking variant ofbeginTX(String,Map).StompClientConnectionbeginTXAndForget(String id)Variant ofbeginTX(String)that ignores the result of the operation.StompClientConnectionbeginTXAndForget(String id, Map<String,String> headers)Variant ofbeginTX(String,Map)that ignores the result of the operation.voidclose()StompClientConnectioncloseHandler(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.FramecommitAndAwait(String id)Blocking variant ofcommit(String).io.vertx.ext.stomp.FramecommitAndAwait(String id, Map<String,String> headers)Blocking variant ofcommit(String,Map).StompClientConnectioncommitAndForget(String id)Variant ofcommit(String)that ignores the result of the operation.StompClientConnectioncommitAndForget(String id, Map<String,String> headers)Variant ofcommit(String,Map)that ignores the result of the operation.StompClientConnectionconnectionDroppedHandler(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.FramedisconnectAndAwait()Blocking variant ofdisconnect().io.vertx.ext.stomp.FramedisconnectAndAwait(io.vertx.ext.stomp.Frame frame)Blocking variant ofdisconnect(Frame).StompClientConnectiondisconnectAndForget()Variant ofdisconnect()that ignores the result of the operation.StompClientConnectiondisconnectAndForget(io.vertx.ext.stomp.Frame frame)Variant ofdisconnect(Frame)that ignores the result of the operation.booleanequals(Object o)StompClientConnectionerrorHandler(Consumer<io.vertx.ext.stomp.Frame> handler)StompClientConnectionexceptionHandler(Consumer<Throwable> exceptionHandler)io.vertx.ext.stomp.StompClientConnectiongetDelegate()inthashCode()booleanisConnected()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.FramenackAndAwait(String id)Blocking variant ofnack(String).io.vertx.ext.stomp.FramenackAndAwait(String id, String txId)Blocking variant ofnack(String,String).StompClientConnectionnackAndForget(String id)Variant ofnack(String)that ignores the result of the operation.StompClientConnectionnackAndForget(String id, String txId)Variant ofnack(String,String)that ignores the result of the operation.static StompClientConnectionnewInstance(io.vertx.ext.stomp.StompClientConnection arg)StompClientConnectionpingHandler(Consumer<StompClientConnection> handler)StompClientConnectionreceivedFrameHandler(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 aSENDframe 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 aSENDframe to the server to the given destination.io.smallrye.mutiny.Uni<io.vertx.ext.stomp.Frame>send(Map<String,String> headers, Buffer body)Sends aSENDframe to the server.io.vertx.ext.stomp.FramesendAndAwait(io.vertx.ext.stomp.Frame frame)Blocking variant ofsend(Frame).io.vertx.ext.stomp.FramesendAndAwait(String destination, Buffer body)Blocking variant ofsend(String,io.vertx.mutiny.core.buffer.Buffer).io.vertx.ext.stomp.FramesendAndAwait(String destination, Map<String,String> headers, Buffer body)Blocking variant ofsend(String,Map,io.vertx.mutiny.core.buffer.Buffer).io.vertx.ext.stomp.FramesendAndAwait(Map<String,String> headers, Buffer body)Blocking variant ofsend(Map,io.vertx.mutiny.core.buffer.Buffer).StompClientConnectionsendAndForget(io.vertx.ext.stomp.Frame frame)Variant ofsend(Frame)that ignores the result of the operation.StompClientConnectionsendAndForget(String destination, Buffer body)Variant ofsend(String,io.vertx.mutiny.core.buffer.Buffer)that ignores the result of the operation.StompClientConnectionsendAndForget(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.StompClientConnectionsendAndForget(Map<String,String> headers, Buffer body)Variant ofsend(Map,io.vertx.mutiny.core.buffer.Buffer)that ignores the result of the operation.Stringserver()Stringsession()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.StringsubscribeAndAwait(String destination, Consumer<io.vertx.ext.stomp.Frame> handler)Blocking variant ofsubscribe(String,Consumer).StringsubscribeAndAwait(String destination, Map<String,String> headers, Consumer<io.vertx.ext.stomp.Frame> handler)Blocking variant ofsubscribe(String,Map,Consumer).StompClientConnectionsubscribeAndForget(String destination, Consumer<io.vertx.ext.stomp.Frame> handler)Variant ofsubscribe(String,Consumer)that ignores the result of the operation.StompClientConnectionsubscribeAndForget(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.StringtoString()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.FrameunsubscribeAndAwait(String destination)Blocking variant ofunsubscribe(String).io.vertx.ext.stomp.FrameunsubscribeAndAwait(String destination, Map<String,String> headers)Blocking variant ofunsubscribe(String,Map).StompClientConnectionunsubscribeAndForget(String destination)Variant ofunsubscribe(String)that ignores the result of the operation.StompClientConnectionunsubscribeAndForget(String destination, Map<String,String> headers)Variant ofunsubscribe(String,Map)that ignores the result of the operation.Stringversion()StompClientConnectionwritingFrameHandler(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 aSENDframe 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 benullbody- the body, may benull- Returns:
- the
unifiring 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 benullbody- 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 benullbody- 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 aSENDframe 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 benullbody- the body, may benull- Returns:
- the
unifiring 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 benullbody- 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 benullbody- 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
unifiring 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 aSENDframe 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 benullheaders- the header. Thedestinationheader is replaced by the value given to thedestinationparameterbody- the body, may benull- Returns:
- the
unifiring 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 benullheaders- the header. Thedestinationheader is replaced by the value given to thedestinationparameterbody- 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 benullheaders- the header. Thedestinationheader is replaced by the value given to thedestinationparameterbody- 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 benullhandler- the handler invoked when a message is received on the given destination. Must not benull.- Returns:
- the
unifiring 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 benullhandler- 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 benullhandler- 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 benullheaders- the headers to configure the subscription. It may contain theackheader to configure the acknowledgment policy. If the given set of headers contains theidheader, 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
unifiring 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 benullheaders- the headers to configure the subscription. It may contain theackheader to configure the acknowledgment policy. If the given set of headers contains theidheader, 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 benullheaders- the headers to configure the subscription. It may contain theackheader to configure the acknowledgment policy. If the given set of headers contains theidheader, 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 theidheader).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
unifiring 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 theidheader, 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
unifiring 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
unifiring 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 benullheaders- additional headers to send to the server. Thetransactionheader is replaced by the value passed in the @{code id} parameter- Returns:
- the
unifiring 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 benullheaders- additional headers to send to the server. Thetransactionheader 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 benullheaders- additional headers to send to the server. Thetransactionheader 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
unifiring 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 benullheaders- additional headers to send to the server. Thetransactionheader is replaced by the value passed in the @{code id} parameter- Returns:
- the
unifiring 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 benullheaders- additional headers to send to the server. Thetransactionheader 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 benullheaders- additional headers to send to the server. Thetransactionheader 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
unifiring 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 benullheaders- additional headers to send to the server. Thetransactionheader is replaced by the value passed in the @{code id} parameter- Returns:
- the
unifiring 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 benullheaders- additional headers to send to the server. Thetransactionheader 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 benullheaders- additional headers to send to the server. Thetransactionheader 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 theDISCONNECTframe 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
unifiring 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 theDISCONNECTframe to the server. This method lets you customize theDISCONNECTframe.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
frame- theDISCONNECTframe.- Returns:
- the
unifiring 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- theDISCONNECTframe.- 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- theDISCONNECTframe.- 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. Theidparameter 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
unifiring 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. Theidparameter 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
unifiring 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
unifiring 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
unifiring 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:
trueif the connection is established,falseotherwise
-
newInstance
public static StompClientConnection newInstance(io.vertx.ext.stomp.StompClientConnection arg)
-
-