Class StompClient
- All Implemented Interfaces:
MutinyDelegate
original
non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStompClient
(io.vertx.ext.stomp.StompClient delegate) StompClient
(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
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>
Connects to the server.io.smallrye.mutiny.Uni<StompClientConnection>
Connects to the server.io.smallrye.mutiny.Uni<StompClientConnection>
Connects to the server.Blocking variant ofconnect(int, java.lang.String)
.connectAndAwait
(int port, String host) Blocking variant ofconnect(int,String)
.connectAndAwait
(int port, String host, NetClient net) Blocking variant ofconnect(int,String,io.vertx.mutiny.core.net.NetClient)
.connectAndAwait
(NetClient net) Blocking variant ofconnect(io.vertx.mutiny.core.net.NetClient)
.Variant ofconnect(int, java.lang.String)
that ignores the result of the operation.connectAndForget
(int port, String host) Variant ofconnect(int,String)
that ignores the result of the operation.connectAndForget
(int port, String host, NetClient net) Variant ofconnect(int,String,io.vertx.mutiny.core.net.NetClient)
that ignores the result of the operation.Variant ofconnect(io.vertx.mutiny.core.net.NetClient)
that ignores the result of the operation.static StompClient
static StompClient
boolean
errorFrameHandler
(Consumer<io.vertx.ext.stomp.Frame> handler) exceptionHandler
(Consumer<Throwable> handler) io.vertx.ext.stomp.StompClient
int
hashCode()
boolean
isClosed()
static StompClient
newInstance
(io.vertx.ext.stomp.StompClient arg) io.vertx.ext.stomp.StompClientOptions
options()
receivedFrameHandler
(Consumer<io.vertx.ext.stomp.Frame> handler) toString()
vertx()
writingFrameHandler
(Consumer<io.vertx.ext.stomp.Frame> handler)
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
StompClient
public StompClient(io.vertx.ext.stomp.StompClient delegate) -
StompClient
-
-
Method Details
-
getDelegate
public io.vertx.ext.stomp.StompClient getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
create
- Parameters:
vertx
- the vert.x instance to use- Returns:
- the created
StompClient
-
create
- 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
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
connectAndAwait
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
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
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
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
connectAndAwait
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
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
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
connectAndAwait
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
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
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
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
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
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
- Parameters:
handler
- the handler- Returns:
-
writingFrameHandler
- Parameters:
handler
- the handler- Returns:
-
errorFrameHandler
- Parameters:
handler
- the handler- Returns:
-
exceptionHandler
- Parameters:
handler
- the handler- Returns:
-
close
public void close() -
options
public io.vertx.ext.stomp.StompClientOptions options()- Returns:
- the client's options.
-
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
-