1 7 package org.jboss.jms.serverless; 8 9 import org.jboss.logging.Logger; 10 import javax.jms.JMSException ; 11 import javax.jms.Destination ; 12 import javax.jms.Message ; 13 import javax.jms.MessageListener ; 14 import javax.jms.MessageConsumer ; 15 16 22 abstract class MessageConsumerImpl implements MessageConsumer { 23 24 private static final Logger log = Logger.getLogger(MessageConsumerImpl.class); 25 26 protected SessionImpl session; 27 private MessageListener listener; 28 private Destination destination; 29 30 MessageConsumerImpl(SessionImpl session, Destination destination) { 31 32 this.session = session; 33 this.destination = destination; 34 } 35 36 Destination getDestination() { 37 return destination; 38 } 39 40 44 public String getMessageSelector() throws JMSException { 45 throw new NotImplementedException(); 46 } 47 48 public MessageListener getMessageListener() throws JMSException { 49 return listener; 50 } 51 52 public void setMessageListener(MessageListener listener) throws JMSException { 53 this.listener = listener; 54 } 55 56 public Message receive() throws JMSException { 57 throw new NotImplementedException(); 58 } 59 60 public Message receive(long timeout) throws JMSException { 61 throw new NotImplementedException(); 62 } 63 64 public Message receiveNoWait() throws JMSException { 65 throw new NotImplementedException(); 66 } 67 68 public abstract void close() throws JMSException ; 69 70 } 71 | Popular Tags |