Class StompClient
- java.lang.Object
-
- io.vertx.mutiny.ext.stomp.StompClient
-
public class StompClient extends Object
Defines a STOMP client. 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<StompClient>__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description StompClient(io.vertx.ext.stomp.StompClient delegate)StompClient(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()io.smallrye.mutiny.Uni<StompClientConnection>connect()Connects to the server using the host and port configured in the client's options.io.smallrye.mutiny.Uni<StompClientConnection>connect(int port, String host)Connects to the server.io.smallrye.mutiny.Uni<StompClientConnection>connect(int port, String host, NetClient net)Connects to the server.io.smallrye.mutiny.Uni<StompClientConnection>connect(NetClient net)Connects to the server.StompClientConnectionconnectAndAwait()Blocking variant ofconnect(int, java.lang.String).StompClientConnectionconnectAndAwait(int port, String host)Blocking variant ofconnect(int,String).StompClientConnectionconnectAndAwait(int port, String host, NetClient net)Blocking variant ofconnect(int,String,io.vertx.mutiny.core.net.NetClient).StompClientConnectionconnectAndAwait(NetClient net)Blocking variant ofconnect(io.vertx.mutiny.core.net.NetClient).StompClientconnectAndForget()Variant ofconnect(int, java.lang.String)that ignores the result of the operation.StompClientconnectAndForget(int port, String host)Variant ofconnect(int,String)that ignores the result of the operation.StompClientconnectAndForget(int port, String host, NetClient net)Variant ofconnect(int,String,io.vertx.mutiny.core.net.NetClient)that ignores the result of the operation.StompClientconnectAndForget(NetClient net)Variant ofconnect(io.vertx.mutiny.core.net.NetClient)that ignores the result of the operation.static StompClientcreate(Vertx vertx)static StompClientcreate(Vertx vertx, io.vertx.ext.stomp.StompClientOptions options)booleanequals(Object o)StompClienterrorFrameHandler(Consumer<io.vertx.ext.stomp.Frame> handler)StompClientexceptionHandler(Consumer<Throwable> handler)io.vertx.ext.stomp.StompClientgetDelegate()inthashCode()booleanisClosed()static StompClientnewInstance(io.vertx.ext.stomp.StompClient arg)io.vertx.ext.stomp.StompClientOptionsoptions()StompClientreceivedFrameHandler(Consumer<io.vertx.ext.stomp.Frame> handler)StringtoString()Vertxvertx()StompClientwritingFrameHandler(Consumer<io.vertx.ext.stomp.Frame> handler)
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<StompClient> __TYPE_ARG
-
-
Constructor Detail
-
StompClient
public StompClient(io.vertx.ext.stomp.StompClient delegate)
-
StompClient
public StompClient(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.ext.stomp.StompClient getDelegate()
-
create
public static StompClient create(Vertx vertx)
- Parameters:
vertx- the vert.x instance to use- Returns:
- the created
StompClient
-
create
public static StompClient create(Vertx vertx, io.vertx.ext.stomp.StompClientOptions options)
- Parameters:
vertx- the vert.x instance to useoptions- the options- Returns:
- the created
StompClient
-
connect
@CheckReturnValue public io.smallrye.mutiny.Uni<StompClientConnection> connect(int port, String host)
Connects 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:
port- the server porthost- the server host- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
connectAndAwait
public StompClientConnection connectAndAwait(int port, String host)
Blocking variant ofconnect(int,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:
port- the server porthost- the server host- Returns:
- the StompClientConnection instance produced by the operation.
-
connectAndForget
public StompClient connectAndForget(int port, String host)
Variant ofconnect(int,String)that ignores the result of the operation.This method subscribes on the result of
connect(int,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromconnect(int,String)but you don't need to compose it with other operations.- Parameters:
port- the server porthost- the server host- Returns:
- the instance of StompClient to chain method calls.
-
connect
@CheckReturnValue public io.smallrye.mutiny.Uni<StompClientConnection> connect(NetClient net)
Connects 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:
net- the NET client to use- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
connectAndAwait
public StompClientConnection connectAndAwait(NetClient net)
Blocking variant ofconnect(io.vertx.mutiny.core.net.NetClient).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:
net- the NET client to use- Returns:
- the StompClientConnection instance produced by the operation.
-
connectAndForget
public StompClient connectAndForget(NetClient net)
Variant ofconnect(io.vertx.mutiny.core.net.NetClient)that ignores the result of the operation.This method subscribes on the result of
connect(io.vertx.mutiny.core.net.NetClient), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromconnect(io.vertx.mutiny.core.net.NetClient)but you don't need to compose it with other operations.- Parameters:
net- the NET client to use- Returns:
- the instance of StompClient to chain method calls.
-
connect
@CheckReturnValue public io.smallrye.mutiny.Uni<StompClientConnection> connect(int port, String host, NetClient net)
Connects 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:
port- the server porthost- the server hostnet- the NET client to use- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
connectAndAwait
public StompClientConnection connectAndAwait(int port, String host, NetClient net)
Blocking variant ofconnect(int,String,io.vertx.mutiny.core.net.NetClient).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:
port- the server porthost- the server hostnet- the NET client to use- Returns:
- the StompClientConnection instance produced by the operation.
-
connectAndForget
public StompClient connectAndForget(int port, String host, NetClient net)
Variant ofconnect(int,String,io.vertx.mutiny.core.net.NetClient)that ignores the result of the operation.This method subscribes on the result of
connect(int,String,io.vertx.mutiny.core.net.NetClient), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromconnect(int,String,io.vertx.mutiny.core.net.NetClient)but you don't need to compose it with other operations.- Parameters:
port- the server porthost- the server hostnet- the NET client to use- Returns:
- the instance of StompClient to chain method calls.
-
connect
@CheckReturnValue public io.smallrye.mutiny.Uni<StompClientConnection> connect()
Connects to the server using the host and port configured in the client's options.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.
-
connectAndAwait
public StompClientConnection connectAndAwait()
Blocking variant ofconnect(int, java.lang.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).
- Returns:
- the StompClientConnection instance produced by the operation.
-
connectAndForget
public StompClient connectAndForget()
Variant ofconnect(int, java.lang.String)that ignores the result of the operation.This method subscribes on the result of
connect(int, java.lang.String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromconnect(int, java.lang.String)but you don't need to compose it with other operations.- Returns:
- the instance of StompClient to chain method calls.
-
receivedFrameHandler
public StompClient receivedFrameHandler(Consumer<io.vertx.ext.stomp.Frame> handler)
- Parameters:
handler- the handler- Returns:
-
writingFrameHandler
public StompClient writingFrameHandler(Consumer<io.vertx.ext.stomp.Frame> handler)
- Parameters:
handler- the handler- Returns:
-
errorFrameHandler
public StompClient errorFrameHandler(Consumer<io.vertx.ext.stomp.Frame> handler)
- Parameters:
handler- the handler- Returns:
-
exceptionHandler
public StompClient exceptionHandler(Consumer<Throwable> handler)
- Parameters:
handler- the handler- Returns:
-
close
public void close()
-
options
public io.vertx.ext.stomp.StompClientOptions options()
- Returns:
- the client's options.
-
vertx
public Vertx vertx()
- Returns:
- the vert.x instance used by the client.
-
isClosed
public boolean isClosed()
- Returns:
- whether or not the client is connected to the server.
-
newInstance
public static StompClient newInstance(io.vertx.ext.stomp.StompClient arg)
-
-