List of usage examples for javax.jms MessageConsumer getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:org.jbpm.bpel.integration.jms.StartListener.java
private static Destination getDestination(MessageConsumer messageConsumer) throws JMSException { if (messageConsumer instanceof QueueReceiver) { QueueReceiver queueReceiver = (QueueReceiver) messageConsumer; return queueReceiver.getQueue(); }/*w w w . j a v a2 s . c om*/ if (messageConsumer instanceof TopicSubscriber) { TopicSubscriber topicSubscriber = (TopicSubscriber) messageConsumer; return topicSubscriber.getTopic(); } throw new JMSException("unknown message consumer type: " + messageConsumer.getClass()); }