package org.mockejb.jms;
import javax.jms.*;
public class TextMessageImpl extends MessageImpl implements TextMessage {
private String messageText = null;
public TextMessageImpl(TextMessage msg) throws JMSException {
super(msg);
setText(msg.getText());
}
public TextMessageImpl() {
super();
}
public TextMessageImpl(String text) throws JMSException {
setText(text);
}
public void clearBody() throws JMSException {
super.clearBody();
messageText = null;
}
public void setText(String text) throws JMSException {
checkBodyWriteable();
messageText = text;
}
public String getText() throws JMSException {
return messageText;
}
void resetBody() throws JMSException {
setBodyReadOnly();
}
}