Defines a STOMP client.
Constructor and description |
---|
StompClient
(java.lang.Object delegate) |
Type | Name and description |
---|---|
void |
close() Closes the client. |
StompClient |
connect(int port, java.lang.String host, io.vertx.core.Handler<io.vertx.core.AsyncResult<StompClientConnection>> resultHandler) Connects to the server. |
StompClient |
connect(NetClient net, io.vertx.core.Handler<io.vertx.core.AsyncResult<StompClientConnection>> resultHandler) Connects to the server. |
StompClient |
connect(int port, java.lang.String host, NetClient net, io.vertx.core.Handler<io.vertx.core.AsyncResult<StompClientConnection>> resultHandler) Connects to the server. |
StompClient |
connect(io.vertx.core.Handler<io.vertx.core.AsyncResult<StompClientConnection>> resultHandler) Connects to the server using the host and port configured in the client's options. |
static StompClient |
create(Vertx vertx) Creates a StompClient using the default implementation. |
static StompClient |
create(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> options) Creates a StompClient using the default implementation. |
StompClient |
errorFrameHandler(io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> handler) A general error frame handler. |
java.lang.Object |
getDelegate() |
java.util.Map<java.lang.String, java.lang.Object> |
options() @return the client's options. |
StompClient |
receivedFrameHandler(io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> handler) Configures a received handler that gets notified when a STOMP frame is received by the client. |
Vertx |
vertx()
|
StompClient |
writingFrameHandler(io.vertx.core.Handler<java.util.Map<java.lang.String, java.lang.Object>> handler) Configures a writing handler that gets notified when a STOMP frame is written on the wire. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Closes the client.
Connects to the server.
port
- the server porthost
- the server hostresultHandler
- handler called with the connection resultConnects to the server.
net
- the NET client to useresultHandler
- handler called with the connection resultConnects to the server.
port
- the server porthost
- the server hostnet
- the NET client to useresultHandler
- handler called with the connection resultConnects to the server using the host and port configured in the client's options.
resultHandler
- handler called with the connection resultCreates a StompClient using the default implementation.
vertx
- the vert.x instance to useCreates a StompClient using the default implementation.
vertx
- the vert.x instance to useoptions
- the options (see StompClientOptions) A general error frame handler. It can be used to catch 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 handler
Configures a received handler that gets notified when a STOMP frame is received by the client. This handler can be used for logging, debugging or ad-hoc behavior. The frame can still be modified at the time.
When a connection is created, the handler is used as StompClientConnection.receivedFrameHandler.
handler
- the handler
Configures a writing handler that gets notified when a STOMP frame is written on the wire. This handler can be used for logging, debugging or ad-hoc behavior. The frame can still be modified at the time.
When a connection is created, the handler is used as StompClientConnection.writingFrameHandler.
handler
- the handler