TIBCO EMS .NET API 10.2
TIBCO EMS .NET API 10.2
TIBCO.EMS.TextMessage Class Reference

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

Inheritance diagram for TIBCO.EMS.TextMessage:
TIBCO.EMS.Message

Public Member Functions

 TextMessage (Session session)
 Construct an empty text message for a session. More...
 
 TextMessage (Session session, String text)
 Construct a text message for a session. More...
 
override Object Clone ()
 Create a copy of the TextMessage object. More...
 
override void ClearBody ()
 Clears a message body in preparation for writing More...
 
override string ToString ()
 Return a string representation of the message More...
 
- Public Member Functions inherited from TIBCO.EMS.Message
virtual void ClearProperties ()
 Clears a message's properties. More...
 
virtual bool PropertyExists (string name)
 Test whether a named property has been set on a message. More...
 
bool GetBooleanProperty (string name)
 Returns the value of the boolean property with the specified name. More...
 
byte GetByteProperty (string name)
 Returns the value of the byte property with the specified name. More...
 
short GetShortProperty (string name)
 Returns the value of the short property with the specified name. More...
 
int GetIntProperty (string name)
 Returns the value of the int property with the specified name. More...
 
long GetLongProperty (string name)
 Returns the value of the long property with the specified name. More...
 
float GetFloatProperty (string name)
 Returns the value of the float property with the specified name. More...
 
double GetDoubleProperty (string name)
 Returns the value of the double property with the specified name. More...
 
string GetStringProperty (string name)
 Returns the value of the string property with the specified name. More...
 
Object GetObjectProperty (string name)
 Returns the value of the object property with the specified name. More...
 
virtual object GetProperty (string name, Type type)
 THIS IS FOR INTERNAL USE ONLY More...
 
void SetBooleanProperty (string name, bool val)
 Sets a boolean property value with the specified name into the message More...
 
void SetByteProperty (string name, byte val)
 Sets a byte property value with the specified name into the message More...
 
void SetShortProperty (string name, short val)
 Sets a short property value with the specified name into the message More...
 
void SetIntProperty (string name, int val)
 Sets a int property value with the specified name into the message More...
 
void SetLongProperty (string name, long val)
 Sets a long property value with the specified name into the message More...
 
void SetFloatProperty (string name, float val)
 Sets a float property value with the specified name into the message More...
 
void SetDoubleProperty (string name, double val)
 Sets a double property value with the specified name into the message More...
 
void SetStringProperty (string name, string val)
 Sets a string property value with the specified name into the message More...
 
void SetObjectProperty (string name, Object val)
 Sets an object property value with the specified name into the message More...
 
void SetBytesProperty (string name, byte[] val)
 FOR INTERNAL USE ONLY More...
 
virtual void Acknowledge ()
 Acknowledges all consumed messages of the session of this consumed message. More...
 
override string ToString ()
 returns a string representation of the message More...
 

Properties

string Text [get, set]
 Gets or sets the text content of the text message. More...
 
- Properties inherited from TIBCO.EMS.Message
bool IsCompressed [set]
 THIS IS FOR INTERNAL USE ONLY More...
 
string MessageID [get, set]
 Gets and Sets the message ID for the message. More...
 
long Timestamp [get, set]
 Gets and Sets the timestamp for the message. More...
 
string CorrelationID [get, set]
 Gets and Sets the correlation ID for the message. More...
 
byte[] CorrelationIDAsBytes [get, set]
 Gets and Sets the correlation ID as an array of bytes for the message. More...
 
Destination Destination [get, set]
 Gets and Sets the Destination object for this message. More...
 
Destination ReplyTo [get, set]
 Gets and Sets the message's replyto value. More...
 
int DeliveryMode [get, set]
 Get and set the message's delivery mode as an integer constant as defined in the DeliveryMode class. Users are recommended to use the MessageDeliveryMode enum instead. More...
 
MessageDeliveryMode MsgDeliveryMode [get, set]
 Get and set the message's delivery mode as enum value of type MessageDeliveryMode More...
 
bool Redelivered [get, set]
 Gets and Sets the message's redelivered value. More...
 
string MsgType [get, set]
 Gets and Sets the message's type value. More...
 
long Expiration [get, set]
 Gets and Sets the message's expiration value. More...
 
int Priority [get, set]
 Gets and Sets the message's priority value. More...
 
long DeliveryTime [get]
 Gets the message's delivery time value. More...
 
IEnumerator PropertyNames [get]
 Returns an Enumeration of all the property names. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from TIBCO.EMS.Message
static string GetDeliveryModeName (MessageDeliveryMode deliveryMode)
 
static string GetDeliveryModeName (int deliveryMode)
 
static string GetTimeName (long timestamp)
 
- Public Attributes inherited from TIBCO.EMS.Message
const int DEFAULT_DELIVERY_MODE = TIBCO.EMS.DeliveryMode.PERSISTENT
 The message producer's default delivery mode is PERSISTENT. More...
 
const MessageDeliveryMode DEFAULT_MSG_DELIVERY_MODE = TIBCO.EMS.MessageDeliveryMode.Persistent
 The message producer's default delivery mode is PERSISTENT. More...
 
const int DEFAULT_PRIORITY = 4
 The message producer's default priority is 4. More...
 
const long DEFAULT_TIME_TO_LIVE = 0
 The message producer's default time to live is unlimited; the message never expires. More...
 
- Static Public Attributes inherited from TIBCO.EMS.Message
static EmptyEnum emptyEnum = new EmptyEnum()
 empty enum object for internal use More...
 

Detailed Description

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 MessageNotWriteableException is thrown. If clearBody is called, the message can now be both read from and written to.

Constructor & Destructor Documentation

TIBCO.EMS.TextMessage.TextMessage ( Session  session)
inline

Construct an empty text message for a session.

Parameters
sessionThe session of the message.
TIBCO.EMS.TextMessage.TextMessage ( Session  session,
String  text 
)
inline

Construct a text message for a session.

Parameters
sessionThe session of the message.
textThe text content of the message.

Member Function Documentation

override void TIBCO.EMS.TextMessage.ClearBody ( )
inlinevirtual

Clears a message body in preparation for writing

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.

Calling ClearBody clears the body of a text message, but leaves its header and property values unchanged. If the text message body was read-only, calling ClearBody makes the message writable. The message body appears and behaves identically to an empty body in a newly created message.

Reimplemented from TIBCO.EMS.Message.

override Object TIBCO.EMS.TextMessage.Clone ( )
inlinevirtual

Create a copy of the TextMessage object.

Reimplemented from TIBCO.EMS.Message.

override string TIBCO.EMS.TextMessage.ToString ( )
inline

Return a string representation of the message

Returns
string representation of the message

Property Documentation

string TIBCO.EMS.TextMessage.Text
getset

Gets or sets the text content of the text message.

The string as the content of the message.


Copyright © Cloud Software Group, Inc. All rights reserved.