Save This Page
Home » jboss-javaee-sources » javax » jms » [javadoc | source]
javax.jms
public interface: TextMessage [javadoc | source]

All Implemented Interfaces:
    Message

A TextMessage object is used to send a message containing a java.lang.String. It inherits from the Message interface and adds a text message body.

This message type can be used to transport text-based messages, including those with XML content.

When a client receives a TextMessage, it is in read-only mode. If a client attempts to write to the message at this point, a MessageNotWriteableException is thrown. If clearBody is called, the message can now be both read from and written to.

Method from javax.jms.TextMessage Summary:
getText,   setText
Method from javax.jms.TextMessage Detail:
 public String getText() throws JMSException
    Gets the string containing this message's data. The default value is null.
 public  void setText(String string) throws JMSException
    Sets the string containing this message's data.