public void ack(StompFrame frame) throws Exception { ack(frame.getHeaders().get("message-id"), null); }
public void ack(StompFrame frame) throws Exception { ack(frame.getHeaders().get("message-id"), null); }
public void ack(StompFrame frame, String transaction) throws Exception { ack(frame.getHeaders().get("message-id"), transaction); }
public void ack(StompFrame frame) throws Exception { ack(frame.getHeaders().get("message-id"), null); }
public void ack(StompFrame frame, String transaction) throws Exception { ack(frame.getHeaders().get("message-id"), transaction); }
public void ack(StompFrame frame, String transaction) throws Exception { ack(frame.getHeaders().get("message-id"), transaction); }
private StringBuilder marshalHeaders(StompFrame stomp, StringBuilder buffer) throws IOException { buffer.append(stomp.getAction()); buffer.append(Stomp.NEWLINE); // Output the headers. for (Map.Entry<String, String> entry : stomp.getHeaders().entrySet()) { buffer.append(entry.getKey()); buffer.append(Stomp.Headers.SEPERATOR); buffer.append(encodeHeader(entry.getValue())); buffer.append(Stomp.NEWLINE); } // Add a newline to separate the headers from the content. buffer.append(Stomp.NEWLINE); return buffer; }
private StringBuilder marshalHeaders(StompFrame stomp, StringBuilder buffer) throws IOException { buffer.append(stomp.getAction()); buffer.append(Stomp.NEWLINE); // Output the headers. for (Map.Entry<String, String> entry : stomp.getHeaders().entrySet()) { buffer.append(entry.getKey()); buffer.append(Stomp.Headers.SEPERATOR); buffer.append(encodeHeader(entry.getValue())); buffer.append(Stomp.NEWLINE); } // Add a newline to separate the headers from the content. buffer.append(Stomp.NEWLINE); return buffer; }
@Override void onMessageDispatch(MessageDispatch md, String ackId) throws IOException, JMSException { if (md.getMessage() != null) { super.onMessageDispatch(md, ackId); } else { StompFrame browseDone = new StompFrame(Stomp.Responses.MESSAGE); browseDone.getHeaders().put(Stomp.Headers.Message.SUBSCRIPTION, this.getSubscriptionId()); browseDone.getHeaders().put(Stomp.Headers.Message.BROWSER, "end"); browseDone.getHeaders().put(Stomp.Headers.Message.DESTINATION, protocolConverter.findTranslator(null).convertDestination(protocolConverter, this.destination)); browseDone.getHeaders().put(Stomp.Headers.Message.MESSAGE_ID, "0"); protocolConverter.sendToStomp(browseDone); } }
protected void sendReceipt(StompFrame command) { final String receiptId = command.getHeaders().get(Stomp.Headers.RECEIPT_REQUESTED); if (receiptId != null) { StompFrame sc = new StompFrame(); sc.setAction(Stomp.Responses.RECEIPT); sc.setHeaders(new HashMap<String, String>(1)); sc.getHeaders().put(Stomp.Headers.Response.RECEIPT_ID, receiptId); try { sendToStomp(sc); } catch (IOException e) { LOG.warn("Could not send a receipt for " + command, e); } } }
protected void sendReceipt(StompFrame command) { final String receiptId = command.getHeaders().get(Stomp.Headers.RECEIPT_REQUESTED); if (receiptId != null) { StompFrame sc = new StompFrame(); sc.setAction(Stomp.Responses.RECEIPT); sc.setHeaders(new HashMap<String, String>(1)); sc.getHeaders().put(Stomp.Headers.Response.RECEIPT_ID, receiptId); try { sendToStomp(sc); } catch (IOException e) { LOG.warn("Could not send a receipt for {}", command, e); } } }
@Override void onMessageDispatch(MessageDispatch md, String ackId) throws IOException, JMSException { if (md.getMessage() != null) { super.onMessageDispatch(md, ackId); } else { StompFrame browseDone = new StompFrame(Stomp.Responses.MESSAGE); browseDone.getHeaders().put(Stomp.Headers.Message.SUBSCRIPTION, this.getSubscriptionId()); browseDone.getHeaders().put(Stomp.Headers.Message.BROWSER, "end"); browseDone.getHeaders().put(Stomp.Headers.Message.DESTINATION, protocolConverter.findTranslator(null).convertDestination(protocolConverter, this.destination)); browseDone.getHeaders().put(Stomp.Headers.Message.MESSAGE_ID, "0"); protocolConverter.sendToStomp(browseDone); } }
protected void sendReceipt(StompFrame command) { final String receiptId = command.getHeaders().get(Stomp.Headers.RECEIPT_REQUESTED); if (receiptId != null) { StompFrame sc = new StompFrame(); sc.setAction(Stomp.Responses.RECEIPT); sc.setHeaders(new HashMap<String, String>(1)); sc.getHeaders().put(Stomp.Headers.Response.RECEIPT_ID, receiptId); try { sendToStomp(sc); } catch (IOException e) { LOG.warn("Could not send a receipt for {}", command, e); } } }
public ActiveMQMessage convertMessage(StompFrame command) throws IOException, JMSException { ActiveMQMessage msg = findTranslator(command.getHeaders().get(Stomp.Headers.TRANSFORMATION)).convertFrame(this, command); return msg; }
public ActiveMQMessage convertMessage(StompFrame command) throws IOException, JMSException { ActiveMQMessage msg = findTranslator(command.getHeaders().get(Stomp.Headers.TRANSFORMATION)).convertFrame(this, command); return msg; }
public ActiveMQMessage convertMessage(StompFrame command) throws IOException, JMSException { return findTranslator(command.getHeaders().get(Stomp.Headers.TRANSFORMATION)).convertFrame(this, command); }
public ActiveMQMessage convertMessage(StompFrame command) throws IOException, JMSException { ActiveMQMessage msg = findTranslator(command.getHeaders().get(Stomp.Headers.TRANSFORMATION)).convertFrame(this, command); return msg; }
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 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()); }