Inherits from KMMessage : KCObject : NSObject
Declared in KMTextMessage.h

Overview

A TextMessage object is used to send a message containing a 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 KMMessageNotWriteableException is thrown. If clearBody is called, the message can now be both read from and written to.

Tasks

  • – setText:

    Sets the string containing this message’s data.

  • – text

    Gets the string containing this message’s data. The default value is null.

Instance Methods

setText:

Sets the string containing this message’s data.

- (void)setText:(NSString *)string

Parameters

string

the String containing the message’s data

Exceptions

KMJMSException

if the JMS provider fails to set the text due to some internal error.

KMMessageNotWriteableException

if the message is in read-only mode.

Declared In

KMTextMessage.h

text

Gets the string containing this message’s data. The default value is null.

- (NSString *)text

Return Value

the String containing the message’s data

Exceptions

KMJMSException

if the JMS provider fails to get the text due to some internal error.

Declared In

KMTextMessage.h