| Constructor and Description |
|---|
StompClient(StompClient delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the client.
|
StompClient |
connect(Handler<AsyncResult<StompClientConnection>> resultHandler)
Connects to the server using the host and port configured in the client's options.
|
StompClient |
connect(int port,
String host,
Handler<AsyncResult<StompClientConnection>> resultHandler)
Connects to the server.
|
StompClient |
connect(int port,
String host,
NetClient net,
Handler<AsyncResult<StompClientConnection>> resultHandler)
Connects to the server.
|
StompClient |
connect(NetClient net,
Handler<AsyncResult<StompClientConnection>> resultHandler)
Connects to the server.
|
Observable<StompClientConnection> |
connectObservable()
Connects to the server using the host and port configured in the client's options.
|
Observable<StompClientConnection> |
connectObservable(int port,
String host)
Connects to the server.
|
Observable<StompClientConnection> |
connectObservable(int port,
String host,
NetClient net)
Connects to the server.
|
Observable<StompClientConnection> |
connectObservable(NetClient net)
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.
|
Object |
getDelegate() |
static StompClient |
newInstance(StompClient arg) |
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.
|
public StompClient(StompClient delegate)
public Object getDelegate()
public static StompClient create(Vertx vertx)
StompClient using the default implementation.vertx - the vert.x instance to useStompClientpublic static StompClient create(Vertx vertx, StompClientOptions options)
StompClient using the default implementation.vertx - the vert.x instance to useoptions - the optionsStompClientpublic StompClient connect(int port, String host, Handler<AsyncResult<StompClientConnection>> resultHandler)
port - the server porthost - the server hostresultHandler - handler called with the connection resultStompClientpublic Observable<StompClientConnection> connectObservable(int port, String host)
port - the server porthost - the server hostpublic StompClient connect(NetClient net, Handler<AsyncResult<StompClientConnection>> resultHandler)
net - the NET client to useresultHandler - handler called with the connection resultStompClientpublic Observable<StompClientConnection> connectObservable(NetClient net)
net - the NET client to usepublic StompClient 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 resultStompClientpublic Observable<StompClientConnection> connectObservable(int port, String host, NetClient net)
port - the server porthost - the server hostnet - the NET client to usepublic StompClient connect(Handler<AsyncResult<StompClientConnection>> resultHandler)
resultHandler - handler called with the connection resultStompClientpublic Observable<StompClientConnection> connectObservable()
public StompClient receivedFrameHandler(Handler<Frame> handler)
When a connection is created, the handler is used as
StompClientConnection.receivedFrameHandler(io.vertx.core.Handler<io.vertx.ext.stomp.Frame>).
handler - the handlerStompClientpublic StompClient writingFrameHandler(Handler<Frame> handler)
When a connection is created, the handler is used as
StompClientConnection.writingFrameHandler(io.vertx.core.Handler<io.vertx.ext.stomp.Frame>).
handler - the handlerStompClientpublic StompClient 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 handlerStompClientpublic void close()
public StompClientOptions options()
public Vertx vertx()
public static StompClient newInstance(StompClient arg)
Copyright © 2016. All rights reserved.