@Test public void sendMessageShouldAddContextAndDelegate() throws Exception { unit.send(message); verify(message).setStringProperty(eq(TraceeConstants.TPIC_HEADER), anyString()); verify(messageProducer).send(message); }
@Override public void send(Queue queue, Message message) throws JMSException { messageProducer.writeTraceeContextToMessage(message); delegate.send(queue, message); }
TraceeQueueSender implements QueueSender { @Override public void send(Queue queue, Message message) throws JMSException { messageProducer.writeTraceeContextToMessage(message); delegate.send(queue, message); } }
TraceeQueueSender implements QueueSender { @Override public void send(Queue queue, Message message) throws JMSException { messageProducer.writeTraceeContextToMessage(message); delegate.send(queue, message); } TraceeQueueSender(TraceeMessageProducer messageProducer, QueueSender delegate); }
TraceeQueueSender implements QueueSender { @Override public void send(Queue queue, Message message) throws JMSException { messageProducer.writeTraceeContextToMessage(message); delegate.send(queue, message); } TraceeQueueSender(TraceeMessageProducer messageProducer, QueueSender delegate); @Override Queue getQueue(); @Override void send(Queue queue, Message message); @Override void send(Queue queue, Message message, int deliveryMode, int priority, long timeToLive); @Override void send(Message message); @Override void send(Message message, int deliveryMode, int priority, long timeToLive); @Override void send(Destination destination, Message message); @Override void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive); @Override void setDisableMessageID(boolean value); @Override boolean getDisableMessageID(); @Override void setDisableMessageTimestamp(boolean value); @Override boolean getDisableMessageTimestamp(); @Override void setDeliveryMode(int deliveryMode); @Override int getDeliveryMode(); @Override void setPriority(int defaultPriority); @Override int getPriority(); @Override void setTimeToLive(long timeToLive); @Override long getTimeToLive(); @Override Destination getDestination(); @Override void close(); }
TraceeQueueSender implements QueueSender { @Override public void send(Queue queue, Message message) throws JMSException { messageProducer.writeTraceeContextToMessage(message); delegate.send(queue, message); } TraceeQueueSender(TraceeMessageProducer messageProducer, QueueSender delegate); @Override Queue getQueue(); @Override void send(Queue queue, Message message); @Override void send(Queue queue, Message message, int deliveryMode, int priority, long timeToLive); @Override void send(Message message); @Override void send(Message message, int deliveryMode, int priority, long timeToLive); @Override void send(Destination destination, Message message); @Override void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive); @Override void setDisableMessageID(boolean value); @Override boolean getDisableMessageID(); @Override void setDisableMessageTimestamp(boolean value); @Override boolean getDisableMessageTimestamp(); @Override void setDeliveryMode(int deliveryMode); @Override int getDeliveryMode(); @Override void setPriority(int defaultPriority); @Override int getPriority(); @Override void setTimeToLive(long timeToLive); @Override long getTimeToLive(); @Override Destination getDestination(); @Override void close();  }