@Override protected void doStop() { this.messageListenerContainer.stop(); }
@Override public void stop() { if (this.container != null) { this.container.stop(); this.declared = false; } }
@Override protected void doStop() { this.messageListenerContainer.stop(); }
@Override public void stop(Runnable callback) { if (this.container != null) { this.container.stop(callback); this.declared = false; } else { callback.run(); } }
@Override public void stop() { if (this.listenerContainer != null) { this.listenerContainer.stop(); } }
@Override public synchronized void stop() { if (this.running) { if (this.ownContainer) { this.container.stop(); } this.running = false; this.stopInvoked = true; } }
@Override public void stop(Runnable callback) { if (this.listenerContainer != null) { this.listenerContainer.stop(callback); } }
@Override public synchronized void stop() { if (this.running) { if (this.ownContainer) { this.container.stop(); } this.running = false; this.stopInvoked = true; } }
@Override public void stop() { if (this.listenerContainer != null) { this.listenerContainer.stop(); } }
@Override public void stop(Runnable callback) { if (this.listenerContainer != null) { this.listenerContainer.stop(callback); } }
@Override public void stop() { if (this.container != null) { this.container.stop(); this.declared = false; } }
@Override protected void doStop() { this.messageListenerContainer.stop(); }
@Override protected void doStop() { this.messageListenerContainer.stop(); }
@Override public void stop(Runnable callback) { try { stop(); } finally { callback.run(); } }
@Override public void stop(Runnable callback) { try { stop(); } finally { callback.run(); } }
@Override public void stop(Runnable callback) { if (this.container != null) { this.container.stop(callback); this.declared = false; } else { callback.run(); } }
@Override public synchronized void stop() { if (this.running) { if (this.container != null) { this.container.stop(); } if (this.directReplyToContainer != null) { this.directReplyToContainer.stop(); } for (RabbitFuture<?> future : this.pending.values()) { future.setNackCause("AsyncRabbitTemplate was stopped while waiting for reply"); future.cancel(true); } if (this.internalTaskScheduler) { ((ThreadPoolTaskScheduler) this.taskScheduler).destroy(); this.taskScheduler = null; } } this.running = false; }
@Override public synchronized void stop() { if (this.running) { if (this.container != null) { this.container.stop(); } if (this.directReplyToContainer != null) { this.directReplyToContainer.stop(); } for (RabbitFuture<?> future : this.pending.values()) { future.setNackCause("AsyncRabbitTemplate was stopped while waiting for reply"); future.cancel(true); } if (this.internalTaskScheduler) { ((ThreadPoolTaskScheduler) this.taskScheduler).destroy(); this.taskScheduler = null; } } this.running = false; }
private void testBrokerNamedQueue(AbstractMessageListenerContainer container, CountDownLatch latch1, CountDownLatch latch2, Queue queue) throws Exception { container.start(); String firstActualName = queue.getActualName(); this.message.set(null); this.template.convertAndSend(firstActualName, "foo"); assertThat(latch1.await(10, TimeUnit.SECONDS)).isTrue(); assertThat(this.message.get().getBody()).isEqualTo("foo".getBytes()); final CountDownLatch newConnectionLatch = new CountDownLatch(2); this.cf.addConnectionListener(c -> newConnectionLatch.countDown()); this.cf.resetConnection(); assertThat(newConnectionLatch.await(10, TimeUnit.SECONDS)).isTrue(); String secondActualName = queue.getActualName(); assertThat(secondActualName).isNotEqualTo(firstActualName); this.message.set(null); this.template.convertAndSend(secondActualName, "bar"); assertThat(latch2.await(10, TimeUnit.SECONDS)).isTrue(); assertThat(this.message.get().getBody()).isEqualTo("bar".getBytes()); container.stop(); }
assertTrue(commitLatch.await(10, TimeUnit.SECONDS)); verify(channel).basicAck(anyLong(), anyBoolean()); container.stop();