KickJava   Java API By Example, From Geeks To Geeks.

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


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.message.JBossMessage;
10 import org.jboss.jms.server.MessageReference;
11
12 /**
13  * A message reference
14  *
15  * @author <a HREF="mailto:adrian@jboss.org>Adrian Brock</a>
16  * @version $Revision: 1.1 $
17  */

18 public class StandardMessageReference
19    implements MessageReference
20 {
21    // Constants -----------------------------------------------------
22

23    // Attributes ----------------------------------------------------
24

25    /** The message */
26    private JBossMessage message;
27
28    // Static --------------------------------------------------------
29

30    // Constructors --------------------------------------------------
31

32    public StandardMessageReference(JBossMessage message)
33    {
34       this.message = message;
35    }
36
37    // Public --------------------------------------------------------
38

39    // MessageReference implementation -------------------------------
40

41    public JBossMessage getMessage()
42       throws Exception JavaDoc
43    {
44       return message;
45    }
46
47    public int getPriority()
48       throws Exception JavaDoc
49    {
50       return message.getJMSPriority();
51    }
52    
53    public String JavaDoc getMessageID()
54       throws Exception JavaDoc
55    {
56       return message.getJMSMessageID();
57    }
58
59    // Protected ------------------------------------------------------
60

61    // Package Private ------------------------------------------------
62

63    // Private --------------------------------------------------------
64

65    // Inner Classes --------------------------------------------------
66

67 }
68
Popular Tags