@Override @Nullable public Queue getQueue() throws JMSException { return (this.target instanceof QueueReceiver ? ((QueueReceiver) this.target).getQueue() : null); }
@Override public Queue getQueue() throws JMSException { checkQueueReceiver(); return ((QueueReceiver) delegate).getQueue(); }
@Override public Queue getQueue() throws JMSException { return (this.target instanceof QueueReceiver ? ((QueueReceiver) this.target).getQueue() : null); }
public Queue getQueue() throws JMSException { return ((QueueReceiver) consumer).getQueue(); } }
public Queue getQueue() throws JMSException { return (this.target instanceof QueueReceiver ? ((QueueReceiver) this.target).getQueue() : null); }
@Override @Nullable public Queue getQueue() throws JMSException { return (this.target instanceof QueueReceiver ? ((QueueReceiver) this.target).getQueue() : null); }
public Queue getQueue() throws JMSException { checkState(); return ((QueueReceiver) consumer).getQueue(); } }
/** * Get queue * @return The queue * @exception JMSException Thrown if an error occurs */ public Queue getQueue() throws JMSException { if (_log.isTraceEnabled()) { _log.trace("getQueue()"); } checkState(); return ((QueueReceiver)_consumer).getQueue(); } }
/** * Returns the list of the <code>QueueReceiver</code> objects * for a specific <code>Queue</code>. * @param queueName the name of the <code>Queue</code> * @return the list of <code>QueueReceiver</code> objects */ public List getQueueReceiverList(String queueName) { List resultList = new ArrayList(); for(int ii = 0; ii < queueReceiverList.size(); ii++) { QueueReceiver receiver = (QueueReceiver)queueReceiverList.get(ii); try { if(receiver.getQueue().getQueueName().equals(queueName)) { resultList.add(receiver); } } catch(JMSException exc) { } } return Collections.unmodifiableList(resultList); }
/** * Returns the list of the <code>QueueReceiver</code> objects * for a specific <code>Queue</code>. * @param queueName the name of the <code>Queue</code> * @return the list of <code>QueueReceiver</code> objects */ public List getQueueReceiverList(String queueName) { List resultList = new ArrayList(); for(int ii = 0; ii < queueReceiverList.size(); ii++) { QueueReceiver receiver = (QueueReceiver)queueReceiverList.get(ii); try { if(receiver.getQueue().getQueueName().equals(queueName)) { resultList.add(receiver); } } catch(JMSException exc) { } } return Collections.unmodifiableList(resultList); }
/** * Get queue * * @return The queue * @throws JMSException Thrown if an error occurs */ @Override public Queue getQueue() throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("getQueue()"); } checkState(); return ((QueueReceiver) consumer).getQueue(); } }
/** * Get queue * * @return The queue * @throws JMSException Thrown if an error occurs */ @Override public Queue getQueue() throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("getQueue()"); } checkState(); return ((QueueReceiver) consumer).getQueue(); } }
@Test public void testGetQueue() throws Exception { Connection consumerConnection = null; try { consumerConnection = createConnection(); Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageConsumer queueConsumer = consumerSession.createConsumer(queue1); Queue q = ((QueueReceiver) queueConsumer).getQueue(); ProxyAssertSupport.assertEquals(queue1, q); } finally { if (consumerConnection != null) { consumerConnection.close(); } } }
@Test public void testGetQueueOnClosedConsumer() throws Exception { Connection consumerConnection = null; try { consumerConnection = createConnection(); Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageConsumer queueConsumer = consumerSession.createConsumer(queue1); queueConsumer.close(); try { ((QueueReceiver) queueConsumer).getQueue(); Assert.fail("must throw a JMS IllegalStateException"); } catch (javax.jms.IllegalStateException e) { // OK } } finally { if (consumerConnection != null) { consumerConnection.close(); } } }