/** {@inheritDoc} */ @Override protected void body() throws InterruptedException { if (log.isDebugEnabled()) log.debug("Message worker started [locNodeId=" + getConfiguredNodeId() + ']'); while (!isCancelled()) { if (beforeEachPoll != null) beforeEachPoll.run(); T msg = queue.poll(pollingTimeout, TimeUnit.MILLISECONDS); if (msg == null) noMessageLoop(); else processMessage(msg); } }
/** {@inheritDoc} */ @Override protected void body() throws InterruptedException { if (log.isDebugEnabled()) log.debug("Message worker started [locNodeId=" + getConfiguredNodeId() + ']'); while (!isCancelled()) { if (beforeEachPoll != null) beforeEachPoll.run(); T msg = queue.poll(pollingTimeout, TimeUnit.MILLISECONDS); if (msg == null) noMessageLoop(); else processMessage(msg); } }