KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > jms > serverless > MessageConsumerImpl


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.jms.serverless;
8
9 import org.jboss.logging.Logger;
10 import javax.jms.JMSException JavaDoc;
11 import javax.jms.Destination JavaDoc;
12 import javax.jms.Message JavaDoc;
13 import javax.jms.MessageListener JavaDoc;
14 import javax.jms.MessageConsumer JavaDoc;
15
16 /**
17  *
18  * @author Ovidiu Feodorov <ovidiu@jboss.org>
19  * @version $Revision: 1.1 $ $Date: 2004/04/15 22:54:19 $
20  *
21  **/

22 abstract class MessageConsumerImpl implements MessageConsumer JavaDoc {
23
24     private static final Logger log = Logger.getLogger(MessageConsumerImpl.class);
25
26     protected SessionImpl session;
27     private MessageListener JavaDoc listener;
28     private Destination JavaDoc destination;
29
30     MessageConsumerImpl(SessionImpl session, Destination JavaDoc destination) {
31
32         this.session = session;
33         this.destination = destination;
34     }
35
36     Destination JavaDoc getDestination() {
37         return destination;
38     }
39
40     //
41
// MessageConsumer INTERFACE IMPLEMENTATION
42
//
43

44     public String JavaDoc getMessageSelector() throws JMSException JavaDoc {
45         throw new NotImplementedException();
46     }
47
48     public MessageListener JavaDoc getMessageListener() throws JMSException JavaDoc {
49         return listener;
50     }
51
52     public void setMessageListener(MessageListener JavaDoc listener) throws JMSException JavaDoc {
53         this.listener = listener;
54     }
55
56     public Message JavaDoc receive() throws JMSException JavaDoc {
57         throw new NotImplementedException();
58     }
59
60     public Message JavaDoc receive(long timeout) throws JMSException JavaDoc {
61         throw new NotImplementedException();
62     }
63
64     public Message JavaDoc receiveNoWait() throws JMSException JavaDoc {
65         throw new NotImplementedException();
66     }
67
68     public abstract void close() throws JMSException JavaDoc;
69
70 }
71
Popular Tags