@Override public ActiveMQMessage nextElement() { ActiveMQMessage msg; if (hasMoreElements()) { ClientMessage next = current; current = null; msg = ActiveMQMessage.createMessage(next, session, options); if (enable1xPrefixes) { msg.setEnable1xPrefixes(true); } try { msg.doBeforeReceive(); } catch (Exception e) { ActiveMQJMSClientLogger.LOGGER.errorCreatingMessage(msg.getCoreMessage().toString(), e); return null; } return msg; } else { throw new NoSuchElementException(); } } }
@Override public ActiveMQMessage nextElement() { ActiveMQMessage msg; if (hasMoreElements()) { ClientMessage next = current; current = null; if (enable1xPrefixes) { msg = ActiveMQCompatibleMessage.createMessage(next, session, options); } else { msg = ActiveMQMessage.createMessage(next, session, options); } try { msg.doBeforeReceive(); } catch (Exception e) { ActiveMQJMSClientLogger.LOGGER.errorCreatingMessage(msg.getCoreMessage().toString(), e); return null; } return msg; } else { throw new NoSuchElementException(); } } }
@Override public ActiveMQMessage nextElement() { ActiveMQMessage msg; if (hasMoreElements()) { ClientMessage next = current; current = null; msg = ActiveMQMessage.createMessage(next, session, options); if (enable1xPrefixes) { msg.setEnable1xPrefixes(true); } try { msg.doBeforeReceive(); } catch (Exception e) { ActiveMQJMSClientLogger.LOGGER.errorCreatingMessage(msg.getCoreMessage().toString(), e); return null; } return msg; } else { throw new NoSuchElementException(); } } }
@Override public ActiveMQMessage nextElement() { ActiveMQMessage msg; if (hasMoreElements()) { ClientMessage next = current; current = null; if (enable1xPrefixes) { msg = ActiveMQCompatibleMessage.createMessage(next, session, options); } else { msg = ActiveMQMessage.createMessage(next, session, options); } try { msg.doBeforeReceive(); } catch (Exception e) { ActiveMQJMSClientLogger.LOGGER.errorCreatingMessage(msg.getCoreMessage().toString(), e); return null; } return msg; } else { throw new NoSuchElementException(); } } }
@Override public ActiveMQMessage nextElement() { ActiveMQMessage msg; if (hasMoreElements()) { ClientMessage next = current; current = null; msg = ActiveMQMessage.createMessage(next, session, options); if (enable1xPrefixes) { msg.setEnable1xPrefixes(true); } try { msg.doBeforeReceive(); } catch (Exception e) { ActiveMQJMSClientLogger.LOGGER.errorCreatingMessage(msg.getCoreMessage().toString(), e); return null; } return msg; } else { throw new NoSuchElementException(); } } }