Methods
close()
Closes the client.
- Source:
connect(port, host, net, resultHandler) → {StompClient}
Connects to the server.
Parameters:
Name | Type | Description |
---|---|---|
port |
number | the server port |
host |
string | the server host |
net |
NetClient | the NET client to use |
resultHandler |
function | handler called with the connection result |
- Source:
Returns:
the current StompClient
- Type
- StompClient
errorFrameHandler(handler) → {StompClient}
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.
Parameters:
Name | Type | Description |
---|---|---|
handler |
function | the handler |
- Source:
Returns:
the current StompClient
- Type
- StompClient
options() → {Object}
- Source:
Returns:
-
the client's options.
-
- Type
- Object
receivedFrameHandler(handler) → {StompClient}
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.
Parameters:
Name | Type | Description |
---|---|---|
handler |
function | the handler |
- Source:
Returns:
the current StompClient
- Type
- StompClient
vertx() → {Vertx}
- Source:
Returns:
-
the vert.x instance used by the client.
-
- Type
- Vertx
writingFrameHandler(handler) → {StompClient}
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.
Parameters:
Name | Type | Description |
---|---|---|
handler |
function | the handler |
- Source:
Returns:
the current StompClient
- Type
- StompClient