public class StompClientConnection extends Object
StompClientConnection, that let
send and receive STOMP frames.
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.| Constructor and Description |
|---|
StompClientConnection(StompClientConnection delegate) |
| Modifier and Type | Method and Description |
|---|---|
StompClientConnection |
abort(String id)
Aborts a transaction.
|
StompClientConnection |
abort(String id,
Handler<Frame> receiptHandler)
Aborts a transaction.
|
StompClientConnection |
abort(String id,
Map<String,String> headers)
Aborts a transaction.
|
StompClientConnection |
abort(String id,
Map<String,String> headers,
Handler<Frame> receiptHandler)
Aborts a transaction.
|
StompClientConnection |
ack(String id)
Sends an acknowledgement for a specific message.
|
StompClientConnection |
ack(String id,
Handler<Frame> receiptHandler)
Sends an acknowledgement for a specific message.
|
StompClientConnection |
ack(String id,
String txId)
Sends an acknowledgement for the given frame.
|
StompClientConnection |
ack(String id,
String txId,
Handler<Frame> receiptHandler)
Sends an acknowledgement for the given frame.
|
StompClientConnection |
beginTX(String id)
Begins a transaction.
|
StompClientConnection |
beginTX(String id,
Handler<Frame> receiptHandler)
Begins a transaction.
|
StompClientConnection |
beginTX(String id,
Map<String,String> headers)
Begins a transaction.
|
StompClientConnection |
beginTX(String id,
Map<String,String> headers,
Handler<Frame> receiptHandler)
Begins a transaction.
|
void |
close()
Closes the connection without sending the
DISCONNECT frame. |
StompClientConnection |
closeHandler(Handler<StompClientConnection> handler)
Sets a handler notified when the STOMP connection is closed.
|
StompClientConnection |
commit(String id)
Commits a transaction.
|
StompClientConnection |
commit(String id,
Handler<Frame> receiptHandler)
Commits a transaction.
|
StompClientConnection |
commit(String id,
Map<String,String> headers)
Commits a transaction.
|
StompClientConnection |
commit(String id,
Map<String,String> headers,
Handler<Frame> receiptHandler)
Commits a transaction.
|
StompClientConnection |
disconnect()
Disconnects the client.
|
StompClientConnection |
disconnect(Frame frame)
Disconnects the client.
|
StompClientConnection |
disconnect(Frame frame,
Handler<Frame> receiptHandler)
Disconnects the client.
|
StompClientConnection |
disconnect(Handler<Frame> receiptHandler)
Disconnects the client.
|
StompClientConnection |
errorHandler(Handler<Frame> handler)
Sets a handler notified when an
ERROR frame is received by the client. |
Object |
getDelegate() |
StompClientConnection |
nack(String id)
Sends a non-acknowledgement for the given message.
|
StompClientConnection |
nack(String id,
Handler<Frame> receiptHandler)
Sends a non-acknowledgement for the given message.
|
StompClientConnection |
nack(String id,
String txId)
Sends a non-acknowledgement for the given frame.
|
StompClientConnection |
nack(String id,
String txId,
Handler<Frame> receiptHandler)
Sends a non-acknowledgement for the given frame.
|
static StompClientConnection |
newInstance(StompClientConnection arg) |
StompClientConnection |
pingHandler(Handler<StompClientConnection> handler)
Sets a handler that let customize the behavior when a ping needs to be sent to the server.
|
StompClientConnection |
send(Frame frame)
Sends the given frame to the server.
|
StompClientConnection |
send(Frame frame,
Handler<Frame> receiptHandler)
Sends the given frame to the server.
|
StompClientConnection |
send(Map<String,String> headers,
Buffer body)
Sends a
SEND frame to the server. |
StompClientConnection |
send(Map<String,String> headers,
Buffer body,
Handler<Frame> receiptHandler)
Sends a
SEND frame to the server. |
StompClientConnection |
send(String destination,
Buffer body)
Sends a
SEND frame to the server to the given destination. |
StompClientConnection |
send(String destination,
Buffer body,
Handler<Frame> receiptHandler)
Sends a
SEND frame to the server to the given destination. |
StompClientConnection |
send(String destination,
Map<String,String> headers,
Buffer body)
Sends a
SEND frame to the server to the given destination. |
StompClientConnection |
send(String destination,
Map<String,String> headers,
Buffer body,
Handler<Frame> receiptHandler)
Sends a
SEND frame to the server to the given destination. |
String |
server() |
String |
session() |
String |
subscribe(String destination,
Handler<Frame> handler)
Subscribes to the given destination.
|
String |
subscribe(String destination,
Handler<Frame> handler,
Handler<Frame> receiptHandler)
Subscribes to the given destination.
|
String |
subscribe(String destination,
Map<String,String> headers,
Handler<Frame> handler)
Subscribes to the given destination.
|
String |
subscribe(String destination,
Map<String,String> headers,
Handler<Frame> handler,
Handler<Frame> receiptHandler)
Subscribes to the given destination.
|
StompClientConnection |
unsubscribe(String destination)
Un-subscribes from the given destination.
|
StompClientConnection |
unsubscribe(String destination,
Handler<Frame> receiptHandler)
Un-subscribes from the given destination.
|
StompClientConnection |
unsubscribe(String destination,
Map<String,String> headers)
Un-subscribes from the given destination.
|
StompClientConnection |
unsubscribe(String destination,
Map<String,String> headers,
Handler<Frame> receiptHandler)
Un-subscribes from the given destination.
|
String |
version() |
public StompClientConnection(StompClientConnection delegate)
public Object getDelegate()
public String session()
public String version()
public void close()
DISCONNECT frame.public String server()
public StompClientConnection send(Map<String,String> headers, Buffer body)
SEND frame to the server.headers - the headers, must not be nullbody - the body, may be nullStompClientConnectionpublic StompClientConnection send(Map<String,String> headers, Buffer body, Handler<Frame> receiptHandler)
SEND frame to the server.headers - the headers, must not be nullbody - the body, may be nullreceiptHandler - the handler invoked when the RECEIPT frame associated with the sent frame has been received. The handler receives the sent frame.StompClientConnectionpublic StompClientConnection send(String destination, Buffer body)
SEND frame to the server to the given destination. The message does not have any other header.destination - the destination, must not be nullbody - the body, may be nullStompClientConnectionpublic StompClientConnection send(String destination, Buffer body, Handler<Frame> receiptHandler)
SEND frame to the server to the given destination. The message does not have any other header.destination - the destination, must not be nullbody - the body, may be nullreceiptHandler - the handler invoked when the RECEIPT frame associated with the sent frame has been received. The handler receives the sent frame.StompClientConnectionpublic StompClientConnection send(Frame frame)
frame - the frameStompClientConnectionpublic StompClientConnection send(Frame frame, Handler<Frame> receiptHandler)
frame - the framereceiptHandler - the handler invoked when the RECEIPT frame associated with the sent frame has been received. The handler receives the sent frame.StompClientConnectionpublic StompClientConnection send(String destination, Map<String,String> headers, Buffer body)
SEND frame to the server to the given destination.destination - the destination, must not be nullheaders - the header. The destination header is replaced by the value given to the destination parameterbody - the body, may be nullStompClientConnectionpublic StompClientConnection send(String destination, Map<String,String> headers, Buffer body, Handler<Frame> receiptHandler)
SEND frame to the server to the given destination.destination - the destination, must not be nullheaders - the header. The destination header is replaced by the value given to the destination parameterbody - the body, may be nullreceiptHandler - the handler invoked when the RECEIPT frame associated with the sent frame has been received. The handler receives the sent frame.StompClientConnectionpublic String subscribe(String destination, Handler<Frame> handler)
destination - the destination, must not be nullhandler - the handler invoked when a message is received on the given destination. Must not be null.public String subscribe(String destination, Handler<Frame> handler, Handler<Frame> receiptHandler)
destination - the destination, must not be nullhandler - the handler invoked when a message is received on the given destination. Must not be null.receiptHandler - the handler invoked when the RECEIPT frame associated with the subscription has been received. The handler receives the sent frame (SUBSCRIBE).public String subscribe(String destination, Map<String,String> headers, Handler<Frame> handler)
destination - the destination, must not be null.headers - the headers to configure the subscription. It may contain the ack header to configure the acknowledgment policy. If the given set of headers contains the id header, this value is used as subscription id.handler - the handler invoked when a message is received on the given destination. Must not be null.public String subscribe(String destination, Map<String,String> headers, Handler<Frame> handler, Handler<Frame> receiptHandler)
destination - the destination, must not be nullheaders - the headers to configure the subscription. It may contain the ack header to configure the acknowledgment policy. If the given set of headers contains the id header, this value is used as subscription id.handler - the handler invoked when a message is received on the given destination. Must not be null.receiptHandler - the handler invoked when the RECEIPT frame associated with the subscription has been received. The handler receives the sent frame (SUBSCRIBE).public StompClientConnection unsubscribe(String destination)
id header).destination - the destinationStompClientConnectionpublic StompClientConnection unsubscribe(String destination, Handler<Frame> receiptHandler)
id header).destination - the destinationreceiptHandler - the handler invoked when the RECEIPT frame associated with the un-subscription has been received. The handler receives the sent frame (UNSUBSCRIBE).StompClientConnectionpublic StompClientConnection unsubscribe(String destination, Map<String,String> headers)
id header, the header value is used. Otherwise the destination is used.destination - the destinationheaders - the headersStompClientConnectionpublic StompClientConnection unsubscribe(String destination, Map<String,String> headers, Handler<Frame> receiptHandler)
id header, the header value is used. Otherwise the destination is used.destination - the destinationheaders - the headersreceiptHandler - the handler invoked when the RECEIPT frame associated with the un-subscription has been received. The handler receives the sent frame (UNSUBSCRIBE).StompClientConnectionpublic StompClientConnection errorHandler(Handler<Frame> handler)
ERROR frame is received by the client. The handler receives the ERROR frame and a reference on the StompClientConnection.handler - the handlerStompClientConnectionpublic StompClientConnection closeHandler(Handler<StompClientConnection> handler)
handler - the handlerStompClientConnectionpublic StompClientConnection pingHandler(Handler<StompClientConnection> handler)
handler - the handlerStompClientConnectionpublic StompClientConnection beginTX(String id, Handler<Frame> receiptHandler)
id - the transaction id, must not be nullreceiptHandler - the handler invoked when the RECEIPT frame associated with the transaction begin has been processed by the server. The handler receives the sent frame (BEGIN).StompClientConnectionpublic StompClientConnection beginTX(String id)
id - the transaction id, must not be nullStompClientConnectionpublic StompClientConnection beginTX(String id, Map<String,String> headers)
id - the transaction id, must not be nullheaders - additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameterStompClientConnectionpublic StompClientConnection beginTX(String id, Map<String,String> headers, Handler<Frame> receiptHandler)
id - the transaction id, must not be nullheaders - additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameterreceiptHandler - the handler invoked when the RECEIPT frame associated with the transaction begin has been processed by the server. The handler receives the sent frame (BEGIN).StompClientConnectionpublic StompClientConnection commit(String id)
id - the transaction id, must not be nullStompClientConnectionpublic StompClientConnection commit(String id, Handler<Frame> receiptHandler)
id - the transaction id, must not be nullreceiptHandler - the handler invoked when the RECEIPT frame associated with the transaction commit has been processed by the server. The handler receives the sent frame (COMMIT).StompClientConnectionpublic StompClientConnection commit(String id, Map<String,String> headers)
id - the transaction id, must not be nullheaders - additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameterStompClientConnectionpublic StompClientConnection commit(String id, Map<String,String> headers, Handler<Frame> receiptHandler)
id - the transaction id, must not be nullheaders - additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameterreceiptHandler - the handler invoked when the RECEIPT frame associated with the transaction commit has been processed by the server. The handler receives the sent frame (COMMIT).StompClientConnectionpublic StompClientConnection abort(String id)
id - the transaction id, must not be nullStompClientConnectionpublic StompClientConnection abort(String id, Handler<Frame> receiptHandler)
id - the transaction id, must not be nullreceiptHandler - the handler invoked when the RECEIPT frame associated with the transaction cancellation has been processed by the server. The handler receives the sent frame (ABORT).StompClientConnectionpublic StompClientConnection abort(String id, Map<String,String> headers)
id - the transaction id, must not be nullheaders - additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameterStompClientConnectionpublic StompClientConnection abort(String id, Map<String,String> headers, Handler<Frame> receiptHandler)
id - the transaction id, must not be nullheaders - additional headers to send to the server. The transaction header is replaced by the value passed in the @{code id} parameterreceiptHandler - the handler invoked when the RECEIPT frame associated with the transaction cancellation has been processed by the server. The handler receives the sent frame (ABORT).StompClientConnectionpublic StompClientConnection disconnect()
close() method, this method send the DISCONNECT frame to the
server.StompClientConnectionpublic StompClientConnection disconnect(Handler<Frame> receiptHandler)
close() method, this method send the DISCONNECT frame to the
server.receiptHandler - the handler invoked when the RECEIPT frame associated with the disconnection has been processed by the server. The handler receives the sent frame (DISCONNECT).StompClientConnectionpublic StompClientConnection disconnect(Frame frame)
close() method, this method send the DISCONNECT frame to the
server. This method lets you customize the DISCONNECT frame.frame - the DISCONNECT frame.StompClientConnectionpublic StompClientConnection disconnect(Frame frame, Handler<Frame> receiptHandler)
close() method, this method send the DISCONNECT frame to the
server. This method lets you customize the DISCONNECT frame.frame - the DISCONNECT frame.receiptHandler - the handler invoked when the RECEIPT frame associated with the disconnection has been processed by the server. The handler receives the sent frame (DISCONNECT).StompClientConnectionpublic StompClientConnection ack(String id)
id parameter is the message id received in the frame.id - the message id of the message to acknowledgeStompClientConnectionpublic StompClientConnection ack(String id, Handler<Frame> receiptHandler)
id parameter is the message id received in the frame.id - the message id of the message to acknowledgereceiptHandler - the handler invoked when the RECEIPT frame associated with the acknowledgment has been processed by the server. The handler receives the sent frame (ACK).StompClientConnectionpublic StompClientConnection nack(String id)
id parameter is the message id received in the frame.id - the message id of the message to acknowledgeStompClientConnectionpublic StompClientConnection nack(String id, Handler<Frame> receiptHandler)
id parameter is the message id received in the frame.id - the message id of the message to acknowledgereceiptHandler - the handler invoked when the RECEIPT frame associated with the non-acknowledgment has been processed by the server. The handler receives the sent frame (NACK).StompClientConnectionpublic StompClientConnection ack(String id, String txId)
id - the message id of the message to acknowledgetxId - the transaction idStompClientConnectionpublic StompClientConnection ack(String id, String txId, Handler<Frame> receiptHandler)
id - the message id of the message to acknowledgetxId - the transaction idreceiptHandler - the handler invoked when the RECEIPT frame associated with the acknowledgment has been processed by the server. The handler receives the sent frame (ACK).StompClientConnectionpublic StompClientConnection nack(String id, String txId)
id - the message id of the message to acknowledgetxId - the transaction idStompClientConnectionpublic StompClientConnection nack(String id, String txId, Handler<Frame> receiptHandler)
id - the message id of the message to acknowledgetxId - the transaction idreceiptHandler - the handler invoked when the RECEIPT frame associated with the non-acknowledgment has been processed by the server. The handler receives the sent frame (NACK).StompClientConnectionpublic static StompClientConnection newInstance(StompClientConnection arg)
Copyright © 2015. All rights reserved.