KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > messaging > interfaces > MessageSet


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.messaging.interfaces;
8
9 /**
10  * A message set.
11  *
12  * @author <a HREF="mailto:adrian@jboss.org">Adrian Brock</a>
13  * @version $Revision: 1.1 $
14  */

15 public interface MessageSet
16 {
17    // Constants -----------------------------------------------------
18

19    // Public --------------------------------------------------------
20

21    /**
22     * Add a message to the message set.
23     *
24     * @param reference the message reference to add
25     */

26    void add(MessageReference reference);
27
28    /**
29     * Remove a message from the message set.
30     *
31     * @param consumer the consumer used to accept the message
32     * @return a message or null if there are no messages
33     */

34    MessageReference remove(Consumer consumer);
35
36    /**
37     * Lock the message set
38     */

39    void lock();
40    
41    /**
42     * Unlock the message set
43     */

44    void unlock();
45    
46    /**
47     * Set the consumer for out of band notifications
48     *
49     * @param consumer the consumer
50     */

51    void setConsumer(Consumer consumer);
52    
53    // Inner Classes --------------------------------------------------
54
}
55
Popular Tags