//
// JmsaTextMessage.java - JMS Adapter TextMessage
//

package nyangau.jmsadapter;

import javax.jms.*;

public class JmsaTextMessage extends JmsaMessage implements TextMessage
  {
  protected String t;
//...sgetText:2:
public String getText()
  throws JMSException
  { return t; }
//...e
//...ssetText:2:
public void setText(String text)
  throws JMSException
  {
  checkWrite();
  t = text;
  }
//...e

//...sclearBody:2:
public void clearBody()
  throws JMSException
  {
  t = "";
  bro = false;
  }
//...e

//...sJmsaTextMessage:2:
// Called by JmsaSession
public JmsaTextMessage(String text)
  {
  super();
  t = text;
  }

// Called by JmsaSession
public JmsaTextMessage()
  {
  this("");
  }

// For newly received messages, or foreign outbound messages
public JmsaTextMessage(TextMessage m)
  throws JMSException // caused by super(m) and m.getText()
  {
  super(m);
  t = m.getText();
  }

// For converting between message formats
public JmsaTextMessage(JmsaMessage m)
  {
  super(m);
  t = "";
  }
//...e
  }
