public interface StompClient
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the client.
|
Future<StompClientConnection> |
connect()
Like
connect(Handler) but returns a Future of the asynchronous result |
StompClient |
connect(Handler<AsyncResult<StompClientConnection>> resultHandler)
Connects to the server using the host and port configured in the client's options.
|
Future<StompClientConnection> |
connect(int port,
String host)
Like
connect(int, String, Handler) but returns a Future of the asynchronous result |
StompClient |
connect(int port,
String host,
Handler<AsyncResult<StompClientConnection>> resultHandler)
Connects to the server.
|
Future<StompClientConnection> |
connect(int port,
String host,
NetClient net)
Like
connect(int, String, NetClient, Handler) but returns a Future of the asynchronous result |
StompClient |
connect(int port,
String host,
NetClient net,
Handler<AsyncResult<StompClientConnection>> resultHandler)
Connects to the server.
|
Future<StompClientConnection> |
connect(NetClient net)
Like
connect(NetClient, Handler) but returns a Future of the asynchronous result |
StompClient |
connect(NetClient net,
Handler<AsyncResult<StompClientConnection>> resultHandler)
Connects to the server.
|
static StompClient |
create(Vertx vertx)
Creates a
StompClient using the default implementation. |
static StompClient |
create(Vertx vertx,
StompClientOptions options)
Creates a
StompClient using the default implementation. |
StompClient |
errorFrameHandler(Handler<Frame> handler)
A general error frame handler.
|
StompClient |
exceptionHandler(Handler<Throwable> handler)
Sets an exception handler notified for TCP-level errors.
|
boolean |
isClosed() |
StompClientOptions |
options() |
StompClient |
receivedFrameHandler(Handler<Frame> handler)
Configures a received handler that gets notified when a STOMP frame is received by the client.
|
Vertx |
vertx() |
StompClient |
writingFrameHandler(Handler<Frame> handler)
Configures a writing handler that gets notified when a STOMP frame is written on the wire.
|
static StompClient create(Vertx vertx)
StompClient using the default implementation.vertx - the vert.x instance to useStompClientstatic StompClient create(Vertx vertx, StompClientOptions options)
StompClient using the default implementation.vertx - the vert.x instance to useoptions - the optionsStompClientStompClient connect(int port, String host, Handler<AsyncResult<StompClientConnection>> resultHandler)
port - the server porthost - the server hostresultHandler - handler called with the connection resultStompClientFuture<StompClientConnection> connect(int port, String host)
connect(int, String, Handler) but returns a Future of the asynchronous resultStompClient connect(NetClient net, Handler<AsyncResult<StompClientConnection>> resultHandler)
net - the NET client to useresultHandler - handler called with the connection resultStompClientFuture<StompClientConnection> connect(NetClient net)
connect(NetClient, Handler) but returns a Future of the asynchronous resultStompClient connect(int port, String host, NetClient net, Handler<AsyncResult<StompClientConnection>> resultHandler)
port - the server porthost - the server hostnet - the NET client to useresultHandler - handler called with the connection resultStompClientFuture<StompClientConnection> connect(int port, String host, NetClient net)
connect(int, String, NetClient, Handler) but returns a Future of the asynchronous resultStompClient connect(Handler<AsyncResult<StompClientConnection>> resultHandler)
resultHandler - handler called with the connection result. A failure will be sent to the handler if a TCP
level issue happen before the `CONNECTED` frame is received. Afterwards, the
exceptionHandler(Handler) is called.StompClientFuture<StompClientConnection> connect()
connect(Handler) but returns a Future of the asynchronous resultStompClient receivedFrameHandler(Handler<Frame> handler)
When a connection is created, the handler is used as
StompClientConnection.receivedFrameHandler(Handler).
handler - the handlerStompClientStompClient writingFrameHandler(Handler<Frame> handler)
When a connection is created, the handler is used as
StompClientConnection.writingFrameHandler(Handler).
handler - the handlerStompClientStompClient errorFrameHandler(Handler<Frame> handler)
ERROR frame emitted during the connection process
(wrong authentication). This error handler will be pass to all StompClientConnection created from this
client. Obviously, the client can override it when the connection is established.handler - the handlerStompClientStompClient exceptionHandler(Handler<Throwable> handler)
handler - the handlerStompClientvoid close()
StompClientOptions options()
Vertx vertx()
boolean isClosed()
Copyright © 2022 Eclipse. All rights reserved.