public void joinChannel() throws InterruptedException
{
- dataChannelTaskExecutor.joinConsumerTaskJob();
- while (infoChannel.getChannelState() != ChannelState.SHUTTING_DOWN)
+ joinChannel(dataChannelTaskExecutor);
+ joinChannel(infoChannelTaskExecutor);
+ }
+
+ private void joinChannel(
+ ChannelTaskExecutor channelTaskExecutor)
+ throws InterruptedException
+ {
+ Channel channel = channelTaskExecutor.getChannel();
+ while (channel.getChannelState() != ChannelState.SHUTTING_DOWN)
{
- log.info("Waiting for {} to shut down...", infoChannel);
+ log.info("Waiting for {} to shut down...", channel);
Thread.sleep(1000);
}
- infoChannelTaskExecutor.joinConsumerTaskJob();
+ channelTaskExecutor.join();
}
-
- private void joinChannel()
}