TextMessage



public interface TextMessage
extends Message

WebSphere MQ class: JMSTextMessage



java.lang.Object
   |
   +----com.ibm.jms.JMSMessage
           |
           +----com.ibm.jms.JMSTextMessage

Use TextMessage to send a message containing a java.lang.String. It inherits from Message and adds a text message body.

See also: BytesMessage, MapMessage, Message, ObjectMessage and StreamMessage

 

Methods

getText
public java.lang.String getText() throws JMSException

Get the string containing this message's data. The default value is null.

Returns:
The string containing the message's data.

Throws:
JMSException if JMS fails to get the text because of an internal JMS error.

setText
public void setText(java.lang.String string)
                                        throws JMSException

Set the string containing this message's data.

Parameters:
string: the string containing the message's data.

Throws:

  • JMSException if JMS fails to set text because of an internal JMS error.

  • MessageNotWriteableException if the message is in read-only mode.

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.