public void ack(String messageId, String transaction) throws Exception { HashMap<String, String> headers = new HashMap<String, String>(); headers.put("message-id", messageId); if (transaction != null) headers.put("transaction", transaction); StompFrame frame = new StompFrame("ACK", headers); sendFrame(frame.format()); }
public void send(String destination, String message, String transaction, HashMap<String, String> headers) throws Exception { if (headers == null) { headers = new HashMap<String, String>(); } headers.put("destination", destination); if (transaction != null) { headers.put("transaction", transaction); } StompFrame frame = new StompFrame("SEND", headers, message.getBytes()); sendFrame(frame.format()); }
public void subscribe(String destination, String ack, HashMap<String, String> headers) throws Exception { if (headers == null) { headers = new HashMap<String, String>(); } headers.put("destination", destination); if (ack != null) { headers.put("ack", ack); } StompFrame frame = new StompFrame("SUBSCRIBE", headers); sendFrame(frame.format()); }
public void send(String destination, String message, String transaction, HashMap<String, String> headers) throws Exception { if (headers == null) { headers = new HashMap<String, String>(); } headers.put("destination", destination); if (transaction != null) { headers.put("transaction", transaction); } StompFrame frame = new StompFrame("SEND", headers, message.getBytes()); sendFrame(frame.format()); }
public void subscribe(String destination, String ack, HashMap<String, String> headers) throws Exception { if (headers == null) { headers = new HashMap<String, String>(); } headers.put("destination", destination); if (ack != null) { headers.put("ack", ack); } StompFrame frame = new StompFrame("SUBSCRIBE", headers); sendFrame(frame.format()); }
public void commit(String transaction) throws Exception { HashMap<String, String> headers = new HashMap<String, String>(); headers.put("transaction", transaction); StompFrame frame = new StompFrame("COMMIT", headers); sendFrame(frame.format()); }
public void commit(String transaction) throws Exception { HashMap<String, String> headers = new HashMap<String, String>(); headers.put("transaction", transaction); StompFrame frame = new StompFrame("COMMIT", headers); sendFrame(frame.format()); }
public void subscribe(String destination, String ack, HashMap<String, String> headers) throws Exception { if (headers == null) { headers = new HashMap<String, String>(); } headers.put("destination", destination); if (ack != null) { headers.put("ack", ack); } StompFrame frame = new StompFrame("SUBSCRIBE", headers); sendFrame(frame.format()); }
public void ack(String messageId, String transaction) throws Exception { HashMap<String, String> headers = new HashMap<String, String>(); headers.put("message-id", messageId); if (transaction != null) headers.put("transaction", transaction); StompFrame frame = new StompFrame("ACK", headers); sendFrame(frame.format()); }
public void unsubscribe(String destination, HashMap<String, String> headers) throws Exception { if (headers == null) { headers = new HashMap<String, String>(); } headers.put("destination", destination); StompFrame frame = new StompFrame("UNSUBSCRIBE", headers); sendFrame(frame.format()); }
public void abort(String transaction) throws Exception { HashMap<String, String> headers = new HashMap<String, String>(); headers.put("transaction", transaction); StompFrame frame = new StompFrame("ABORT", headers); sendFrame(frame.format()); }
public void unsubscribe(String destination, HashMap<String, String> headers) throws Exception { if (headers == null) { headers = new HashMap<String, String>(); } headers.put("destination", destination); StompFrame frame = new StompFrame("UNSUBSCRIBE", headers); sendFrame(frame.format()); }
public void abort(String transaction) throws Exception { HashMap<String, String> headers = new HashMap<String, String>(); headers.put("transaction", transaction); StompFrame frame = new StompFrame("ABORT", headers); sendFrame(frame.format()); }
public void begin(String transaction) throws Exception { HashMap<String, String> headers = new HashMap<String, String>(); headers.put("transaction", transaction); StompFrame frame = new StompFrame("BEGIN", headers); sendFrame(frame.format()); }
public void unsubscribe(String destination, HashMap<String, String> headers) throws Exception { if (headers == null) { headers = new HashMap<String, String>(); } headers.put("destination", destination); StompFrame frame = new StompFrame("UNSUBSCRIBE", headers); sendFrame(frame.format()); }
public void begin(String transaction) throws Exception { HashMap<String, String> headers = new HashMap<String, String>(); headers.put("transaction", transaction); StompFrame frame = new StompFrame("BEGIN", headers); sendFrame(frame.format()); }
public void disconnect(String receiptId) throws Exception { StompFrame frame = new StompFrame("DISCONNECT"); if (receiptId != null && !receiptId.isEmpty()) { frame.getHeaders().put(Stomp.Headers.RECEIPT_REQUESTED, receiptId); } sendFrame(frame.format()); }
public void disconnect(String receiptId) throws Exception { StompFrame frame = new StompFrame("DISCONNECT"); if (receiptId != null && !receiptId.isEmpty()) { frame.getHeaders().put(Stomp.Headers.RECEIPT_REQUESTED, receiptId); } sendFrame(frame.format()); }
public void connect(HashMap<String, String> headers) throws Exception { StompFrame frame = new StompFrame("CONNECT", headers); sendFrame(frame.format()); StompFrame connect = receive(); if (!connect.getAction().equals(Stomp.Responses.CONNECTED)) { throw new Exception ("Not connected: " + connect.getBody()); } }
public void connect(HashMap<String, String> headers) throws Exception { StompFrame frame = new StompFrame("CONNECT", headers); sendFrame(frame.format()); StompFrame connect = receive(); if (!connect.getAction().equals(Stomp.Responses.CONNECTED)) { throw new Exception ("Not connected: " + connect.getBody()); } }