1 28 29 package com.caucho.jms.message; 30 31 import javax.jms.JMSException ; 32 import javax.jms.TextMessage ; 33 34 37 public class TextMessageImpl extends MessageImpl implements TextMessage { 38 private String _text; 39 40 43 public String getText() 44 throws JMSException 45 { 46 return _text; 47 } 48 49 52 public void setText(String text) 53 throws JMSException 54 { 55 checkBodyWriteable(); 56 57 _text = text; 58 } 59 60 63 public void clearBody() 64 throws JMSException 65 { 66 super.clearBody(); 67 68 _text = null; 69 } 70 71 public MessageImpl copy() 72 { 73 TextMessageImpl msg = new TextMessageImpl(); 74 75 copy(msg); 76 77 return msg; 78 } 79 80 protected void copy(TextMessageImpl newMsg) 81 { 82 super.copy(newMsg); 83 84 newMsg._text = _text; 85 } 86 } 87 88 | Popular Tags |