public static void copyStandardHeadersFromFrameToMessage(ProtocolConverter converter, StompFrame command, ActiveMQMessage msg, FrameTranslator ft) throws ProtocolException, JMSException { final Map<String, String> headers = new HashMap<String, String>(command.getHeaders()); final String destination = headers.remove(Stomp.Headers.Send.DESTINATION); msg.setDestination(ft.convertDestination(converter, destination)); msg.setJMSReplyTo(ft.convertDestination(converter, (String)o));
public ActiveMQMessage convertMessage(StompFrame command) throws IOException, JMSException { ActiveMQMessage msg = findTranslator(command.getHeaders().get(Stomp.Headers.TRANSFORMATION)).convertFrame(this, command); return msg; }
public StompFrame convertMessage(ActiveMQMessage message, boolean ignoreTransformation) throws IOException, JMSException { if (ignoreTransformation == true) { return frameTranslator.convertMessage(this, message); } else { return findTranslator(message.getStringProperty(Stomp.Headers.TRANSFORMATION)).convertMessage(this, message); } }
public static void copyStandardHeadersFromFrameToMessage(ProtocolConverter converter, StompFrame command, ActiveMQMessage msg, FrameTranslator ft) throws ProtocolException, JMSException { final Map<String, String> headers = new HashMap<String, String>(command.getHeaders()); final String destination = headers.remove(Stomp.Headers.Send.DESTINATION); msg.setDestination(ft.convertDestination(converter, destination, true)); if (o != null) { try { ActiveMQDestination dest = ft.convertDestination(converter, (String)o, false); msg.setJMSReplyTo(dest); } catch (ProtocolException pe) {
public StompFrame convertMessage(ActiveMQMessage message, boolean ignoreTransformation) throws IOException, JMSException { if (ignoreTransformation == true) { return frameTranslator.convertMessage(this, message); } else { FrameTranslator translator = findTranslator( message.getStringProperty(Stomp.Headers.TRANSFORMATION), message.getDestination(), message.isAdvisory()); return translator.convertMessage(this, message); } }
public ActiveMQMessage convertMessage(StompFrame command) throws IOException, JMSException { ActiveMQMessage msg = findTranslator(command.getHeaders().get(Stomp.Headers.TRANSFORMATION)).convertFrame(this, command); return msg; }
public static void copyStandardHeadersFromFrameToMessage(ProtocolConverter converter, StompFrame command, ActiveMQMessage msg, FrameTranslator ft) throws ProtocolException, JMSException { final Map<String, String> headers = new HashMap<String, String>(command.getHeaders()); final String destination = headers.remove(Stomp.Headers.Send.DESTINATION); msg.setDestination(ft.convertDestination(converter, destination, true)); if (o != null) { try { ActiveMQDestination dest = ft.convertDestination(converter, (String)o, false); msg.setJMSReplyTo(dest); } catch (ProtocolException pe) {
public StompFrame convertMessage(ActiveMQMessage message, boolean ignoreTransformation) throws IOException, JMSException { if (ignoreTransformation == true) { return frameTranslator.convertMessage(this, message); } else { FrameTranslator translator = findTranslator( message.getStringProperty(Stomp.Headers.TRANSFORMATION), message.getDestination(), message.isAdvisory()); return translator.convertMessage(this, message); } }
public ActiveMQMessage convertMessage(StompFrame command) throws IOException, JMSException { ActiveMQMessage msg = findTranslator(command.getHeaders().get(Stomp.Headers.TRANSFORMATION)).convertFrame(this, command); return msg; }
public static void copyStandardHeadersFromFrameToMessage(ProtocolConverter converter, StompFrame command, ActiveMQMessage msg, FrameTranslator ft) throws ProtocolException, JMSException { final Map<String, String> headers = new HashMap<String, String>(command.getHeaders()); final String destination = headers.remove(Stomp.Headers.Send.DESTINATION); msg.setDestination(ft.convertDestination(converter, destination, true)); if (o != null) { try { ActiveMQDestination dest = ft.convertDestination(converter, (String)o, false); msg.setJMSReplyTo(dest); } catch (ProtocolException pe) {
public StompFrame convertMessage(ActiveMQMessage message, boolean ignoreTransformation) throws IOException, JMSException { if (ignoreTransformation == true) { return frameTranslator.convertMessage(this, message); } else { FrameTranslator translator = findTranslator( message.getStringProperty(Stomp.Headers.TRANSFORMATION), message.getDestination(), message.isAdvisory()); return translator.convertMessage(this, message); } }
public ActiveMQMessage convertMessage(StompFrame command) throws IOException, JMSException { ActiveMQMessage msg = findTranslator(command.getHeaders().get(Stomp.Headers.TRANSFORMATION)).convertFrame(this, command); return msg; }
public static void copyStandardHeadersFromMessageToFrame(ProtocolConverter converter, ActiveMQMessage message, StompFrame command, FrameTranslator ft) throws IOException { final Map<String, String> headers = command.getHeaders(); headers.put(Stomp.Headers.Message.DESTINATION, ft.convertDestination(converter, message.getDestination())); headers.put(Stomp.Headers.Message.MESSAGE_ID, message.getJMSMessageID()); headers.put(Stomp.Headers.Message.REPLY_TO, ft.convertDestination(converter, message.getJMSReplyTo())); headers.put(Stomp.Headers.Message.ORIGINAL_DESTINATION, ft.convertDestination(converter, message.getOriginalDestination()));
@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); } }
public static void copyStandardHeadersFromMessageToFrame(ProtocolConverter converter, ActiveMQMessage message, StompFrame command, FrameTranslator ft) throws IOException { final Map<String, String> headers = command.getHeaders(); headers.put(Stomp.Headers.Message.DESTINATION, ft.convertDestination(converter, message.getDestination())); headers.put(Stomp.Headers.Message.MESSAGE_ID, message.getJMSMessageID()); headers.put(Stomp.Headers.Message.REPLY_TO, ft.convertDestination(converter, message.getJMSReplyTo())); headers.put(Stomp.Headers.Message.ORIGINAL_DESTINATION, ft.convertDestination(converter, message.getOriginalDestination()));
public static void copyStandardHeadersFromMessageToFrame(ProtocolConverter converter, ActiveMQMessage message, StompFrame command, FrameTranslator ft) throws IOException { final Map<String, String> headers = command.getHeaders(); headers.put(Stomp.Headers.Message.DESTINATION, ft.convertDestination(converter, message.getDestination())); headers.put(Stomp.Headers.Message.MESSAGE_ID, message.getJMSMessageID()); headers.put(Stomp.Headers.Message.REPLY_TO, ft.convertDestination(converter, message.getJMSReplyTo())); headers.put(Stomp.Headers.Message.ORIGINAL_DESTINATION, ft.convertDestination(converter, message.getOriginalDestination()));
public static void copyStandardHeadersFromMessageToFrame(ProtocolConverter converter, ActiveMQMessage message, StompFrame command, FrameTranslator ft) throws IOException { final Map<String, String> headers = command.getHeaders(); headers.put(Stomp.Headers.Message.DESTINATION, ft.convertDestination(converter, message.getDestination())); headers.put(Stomp.Headers.Message.MESSAGE_ID, message.getJMSMessageID()); headers.put(Stomp.Headers.Message.REPLY_TO, ft.convertDestination(converter, message.getJMSReplyTo())); headers.put(Stomp.Headers.Message.ORIGINAL_DESTINATION, ft.convertDestination(converter, message.getOriginalDestination()));
@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); } }
@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); } }
String destination = headers.get(Stomp.Headers.Subscribe.DESTINATION); ActiveMQDestination actualDest = translator.convertDestination(this, destination); consumerInfo.setDestination(translator.convertDestination(this, destination));