KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > jms > client > ConsumerDelegate


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.client;
8
9 import javax.jms.JMSException JavaDoc;
10 import javax.jms.Message JavaDoc;
11 import javax.jms.MessageListener JavaDoc;
12
13 /**
14  * The implementation of a consumer
15  *
16  * @author <a HREF="mailto:adrian@jboss.org>Adrian Brock</a>
17  * @version $Revision: 1.2 $
18  */

19 public interface ConsumerDelegate
20    extends Lifecycle
21 {
22    // Constants -----------------------------------------------------
23

24    // Public --------------------------------------------------------
25

26    /**
27     * Receive a message
28     *
29     * @param timeout the timeout
30     * @return the message
31     * @throws JMSException for any error
32     */

33    Message JavaDoc receive(long timeout) throws JMSException JavaDoc;
34
35    /**
36     *
37     * Set the message listener
38     * @param the new message listener
39     * @throws JMSException for any error
40     */

41    void setMessageListener(MessageListener JavaDoc listener) throws JMSException JavaDoc;
42
43    // Inner Classes --------------------------------------------------
44
}
45
Popular Tags