TextMessage


public interface TextMessage
extends Message

WebSphere MQ class: JMSTextMessage



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

TextMessage is used 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.



© IBM Corporation 1997, 2002. All Rights Reserved