@Override public boolean getDisableMessageID() { try { return producer.getDisableMessageID(); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public MessageListener getMessageListener() throws JMSRuntimeException { try { return consumer.getMessageListener(); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public ExceptionListener getExceptionListener() { try { return connection.getExceptionListener(); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public void start() { try { connection.start(); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public TextMessage createTextMessage(String text) { checkSession(); try { return session.createTextMessage(text); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public JMSProducer setDisableMessageTimestamp(boolean value) { try { producer.setDisableMessageTimestamp(value); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } return this; }
@Override public boolean getDisableMessageTimestamp() { try { return producer.getDisableMessageTimestamp(); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public String getMessageSelector() { try { return consumer.getMessageSelector(); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public Queue createQueue(String queueName) { checkSession(); try { return session.createQueue(queueName); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public JMSProducer setDisableMessageID(boolean value) { try { producer.setDisableMessageID(value); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } return this; }
@Override public void close() { try { consumer.close(); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public void setExceptionListener(ExceptionListener listener) { try { connection.setExceptionListener(listener); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public void run() { try { close(); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } } };
@Override public Message receive() { try { return context.setLastMessage(this, consumer.receive()); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public <T> T receiveBody(Class<T> c) { try { Message message = consumer.receive(); context.setLastMessage(ActiveMQJMSConsumer.this, message); return message == null ? null : message.getBody(c); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public <T> T receiveBody(Class<T> c, long timeout) { try { Message message = consumer.receive(timeout); context.setLastMessage(ActiveMQJMSConsumer.this, message); return message == null ? null : message.getBody(c); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public void stop() { threadAwareContext.assertNotMessageListenerThreadRuntime(); try { connection.stop(); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public ObjectMessage createObjectMessage(Serializable object) { checkSession(); try { return session.createObjectMessage(object); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public Topic createTopic(String topicName) { checkSession(); try { return session.createTopic(topicName); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public MapMessage createMapMessage() { checkSession(); try { return session.createMapMessage(); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }