@Test public void testReceiveNoWait() throws JMSException { JMSConsumer consumer = context.createConsumer(context.createTemporaryQueue()); assertNull(consumer.receiveNoWait()); consumer.close(); try { consumer.receiveNoWait(); fail("Should not be able to interact with closed consumer"); } catch (IllegalStateRuntimeException ise) {} }
@Override public Message receiveNoWait() { try { return consumer.receiveNoWait(); } catch (JMSException e) { throw JMSExceptionSupport.createRuntimeException(e); } }
JmsPoolJMSConsumer implements JMSConsumer, AutoCloseable { @Override public Message receiveNoWait() { try { return consumer.receiveNoWait(); } catch (JMSException e) { throw JMSExceptionSupport.createRuntimeException(e); } } }
JmsPoolJMSConsumer implements JMSConsumer, AutoCloseable { @Override public Message receiveNoWait() { try { return consumer.receiveNoWait(); } catch (JMSException e) { throw JMSExceptionSupport.createRuntimeException(e); } } JmsPoolJMSConsumer(JmsPoolMessageConsumer consumer); }
JmsPoolJMSConsumer implements JMSConsumer, AutoCloseable { @Override public Message receiveNoWait() { try { return consumer.receiveNoWait(); } catch (JMSException e) { throw JMSExceptionSupport.createRuntimeException(e); } } JmsPoolJMSConsumer(JmsPoolMessageConsumer consumer); @Override void close(); @Override MessageListener getMessageListener(); @Override String getMessageSelector(); @Override void setMessageListener(MessageListener listener); @Override Message receive(); @Override Message receive(long timeout); @Override Message receiveNoWait(); @Override T receiveBody(Class<T> desired); @Override T receiveBody(Class<T> desired, long timeout); @Override T receiveBodyNoWait(Class<T> desired); @Override String toString(); }
JmsPoolJMSConsumer implements JMSConsumer, AutoCloseable { @Override public Message receiveNoWait() { try { return consumer.receiveNoWait(); } catch (JMSException e) { throw JMSExceptionSupport.createRuntimeException(e); } } JmsPoolJMSConsumer(JmsPoolMessageConsumer consumer); @Override void close(); @Override MessageListener getMessageListener(); @Override String getMessageSelector(); @Override void setMessageListener(MessageListener listener); @Override Message receive(); @Override Message receive(long timeout); @Override Message receiveNoWait(); @Override T receiveBody(Class<T> desired); @Override T receiveBody(Class<T> desired, long timeout); @Override T receiveBodyNoWait(Class<T> desired); @Override String toString();  }