@Test public void testOnMessage_withConsumeLocation_NoMatch() throws Exception { MockMessageProducer producer = new MockMessageProducer(); MockChannel channel = createChannel(Arrays.asList(new AdaptrisMessageProducer[] {producer}), Arrays.asList(new Service[] {new NullService()})); AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage(PAYLOAD_1); MultiProducerWorkflow workflow = (MultiProducerWorkflow) channel.getWorkflowList().get(0); workflow.setConsumer(new ConsumerWithLocation(getName())); try { start(channel); workflow.onAdaptrisMessage(msg); AdaptrisMessage consumed = producer.getMessages().get(0); assertFalse(consumed.headersContainsKey(CoreConstants.MESSAGE_CONSUME_LOCATION)); } finally { stop(channel); } }
@Override public synchronized void onAdaptrisMessage(AdaptrisMessage msg, Consumer<AdaptrisMessage> success, Consumer<AdaptrisMessage> failure) { ListenerCallbackHelper.prepare(msg, success, failure); if (!obtainChannel().isAvailable()) { handleChannelUnavailable(msg); } else { onMessage(msg); } }
MultiProducerWorkflow extends StandardWorkflow { @Override public synchronized void onAdaptrisMessage(AdaptrisMessage msg, Consumer<AdaptrisMessage> success, Consumer<AdaptrisMessage> failure) { ListenerCallbackHelper.prepare(msg, success, failure); if (!obtainChannel().isAvailable()) { handleChannelUnavailable(msg); } else { onMessage(msg); } } }
MultiProducerWorkflow extends StandardWorkflow { @Override public synchronized void onAdaptrisMessage(AdaptrisMessage msg, Consumer<AdaptrisMessage> success, Consumer<AdaptrisMessage> failure) { ListenerCallbackHelper.prepare(msg, success, failure); if (!obtainChannel().isAvailable()) { handleChannelUnavailable(msg); } else { onMessage(msg); } } MultiProducerWorkflow(); }
MultiProducerWorkflow extends StandardWorkflow { @Override public synchronized void onAdaptrisMessage(AdaptrisMessage msg, Consumer<AdaptrisMessage> success, Consumer<AdaptrisMessage> failure) { ListenerCallbackHelper.prepare(msg, success, failure); if (!obtainChannel().isAvailable()) { handleChannelUnavailable(msg); } else { onMessage(msg); } } MultiProducerWorkflow(); @Override synchronized void onAdaptrisMessage(AdaptrisMessage msg, Consumer<AdaptrisMessage> success, Consumer<AdaptrisMessage> failure); void addStandaloneProducer(StandaloneProducer producer); List<StandaloneProducer> getStandaloneProducers(); void setStandaloneProducers(List<StandaloneProducer> l); void setUseProcessedMessage(Boolean useProc); Boolean getUseProcessedMessage(); }
MultiProducerWorkflow extends StandardWorkflow { @Override public synchronized void onAdaptrisMessage(AdaptrisMessage msg, Consumer<AdaptrisMessage> success, Consumer<AdaptrisMessage> failure) { ListenerCallbackHelper.prepare(msg, success, failure); if (!obtainChannel().isAvailable()) { handleChannelUnavailable(msg); } else { onMessage(msg); } } MultiProducerWorkflow(); @Override synchronized void onAdaptrisMessage(AdaptrisMessage msg, Consumer<AdaptrisMessage> success, Consumer<AdaptrisMessage> failure); void addStandaloneProducer(StandaloneProducer producer); List<StandaloneProducer> getStandaloneProducers(); void setStandaloneProducers(List<StandaloneProducer> l); void setUseProcessedMessage(Boolean useProc); Boolean getUseProcessedMessage();  }