1 package net.walend.somnifugi; 2 3 import javax.jms.QueueReceiver ; 4 import javax.jms.Queue ; 5 import javax.jms.JMSException ; 6 7 13 14 public class SomniQueueReceiver 15 extends SomniMessageConsumer 16 implements QueueReceiver 17 { 18 private SomniQueue queue; 19 private String name; 20 21 protected SomniQueueReceiver(SomniQueue queue,String name,SomniExceptionListener exceptionListener,SomniSession session) 22 { 23 super(queue.getTakable(),exceptionListener,session); 24 this.name = name; 25 this.queue = queue; 26 } 27 28 protected SomniQueueReceiver(SomniQueue queue,String name,SomniExceptionListener exceptionListener,SomniMessageSelector messageSelector,SomniSession session) 29 throws SomniMessageSelectorException 30 { 31 super(queue.getTakable(messageSelector),exceptionListener,messageSelector,session); 32 this.name = name; 33 this.queue = queue; 34 } 35 36 44 public Queue getQueue() 45 throws JMSException 46 { 47 return queue; 48 } 49 50 protected SomniDestination getDestination() 51 { 52 return queue; 53 } 54 55 public String getName() 56 { 57 return name; 58 } 59 } 60 61 81 | Popular Tags |