KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > jms > server > standard > StandardMessageBroker


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.server.standard;
8
9 import org.jboss.jms.destination.JBossDestination;
10 import org.jboss.jms.message.JBossMessage;
11 import org.jboss.jms.server.BrowserEndpointFactory;
12 import org.jboss.jms.server.DeliveryEndpointFactory;
13 import org.jboss.jms.server.MessageBroker;
14 import org.jboss.jms.server.MessageReference;
15 import org.jboss.jms.server.list.memory.MemoryMessageList;
16
17 /**
18  * The standard message broker
19  *
20  * @author <a HREF="mailto:adrian@jboss.org>Adrian Brock</a>
21  * @version $Revision: 1.1 $
22  */

23 public class StandardMessageBroker
24    implements MessageBroker
25 {
26    // Constants -----------------------------------------------------
27

28    // Attributes ----------------------------------------------------
29

30    /** The message list */
31    private MemoryMessageList list = new MemoryMessageList();
32
33    // Static --------------------------------------------------------
34

35    // Constructors --------------------------------------------------
36

37    // Public --------------------------------------------------------
38

39    // MessageBroker implementation ----------------------------------
40

41    public BrowserEndpointFactory getBrowserEndpointFactory(JBossDestination destination, String JavaDoc selector)
42    {
43       return new QueueBrowserEndpointFactory(list, selector);
44    }
45
46    public DeliveryEndpointFactory getDeliveryEndpointFactory(JBossDestination destination)
47    {
48       return new QueueDeliveryEndpointFactory(this, list);
49    }
50
51    public MessageReference getMessageReference(JBossMessage message)
52    {
53       return new StandardMessageReference(message);
54    }
55
56    // Protected ------------------------------------------------------
57

58    // Package Private ------------------------------------------------
59

60    // Private --------------------------------------------------------
61

62    // Inner Classes --------------------------------------------------
63

64 }
65
Popular Tags