KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > jms > TextMessageImpl


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;
8
9 import javax.jms.JMSException JavaDoc;
10 import javax.jms.TextMessage JavaDoc;
11
12 /**
13  * @author <a HREF="mailto:nathan@jboss.org">Nathan Phelps</a>
14  * @version $Revision: 1.2 $ $Date: 2003/08/21 10:07:04 $
15  */

16 public class TextMessageImpl extends MessageImpl implements TextMessage JavaDoc
17 {
18
19     TextMessageImpl()
20     {
21         this.type = MessageImpl.TEXT_MESSAGE_NAME;
22     }
23
24     public TextMessageImpl(String JavaDoc text)
25     {
26         this.type = MessageImpl.TEXT_MESSAGE_NAME;
27         this.body = text;
28     }
29
30     public String JavaDoc getText()
31     {
32         return (String JavaDoc) this.body;
33     }
34
35     public void setText(String JavaDoc text) throws JMSException JavaDoc
36     {
37         this.throwExceptionIfReadOnly();
38         super.body = text;
39     }
40 }
Popular Tags