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

An ObjectMessage object is used to send a message that contains a serializable object. More...

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

Public Member Functions

 ObjectMessage (Session session)
 Construct an empty object message for a session. More...
 
 ObjectMessage (Session session, Object obj)
 Construct an object message for a session. More...
 
override Object Clone ()
 Implements the Clone method from ICloneable interface More...
 
override void ClearBody ()
 Clears out the message body. Clearing a message's body does not clear its header values or property entries. 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

Object TheObject [get, set]
 Gets or sets the object content of the ObjectMessage. 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

An ObjectMessage object is used to send a message that contains a serializable object.

Setting the content of a MessageObject stores a snapshot of the object. Subsequent changes to the original object do not affect the message.

Object serialization differs among the various EMS language APIs in ways that are incompatible. An ObjectMessage contains a serialized object. Therefore EMS programs can only send an ObjectMessage to another program written in the same language; for example, Java to Java, C to C, .NET to .NET.

Constructor & Destructor Documentation

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

Construct an empty object message for a session.

Parameters
sessionThe session of the message.
TIBCO.EMS.ObjectMessage.ObjectMessage ( Session  session,
Object  obj 
)
inline

Construct an object message for a session.

Parameters
sessionThe session of the message.
objThe object as the content of the message.

Member Function Documentation

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

Clears out the message body. Clearing a message's body does not clear its header values or property entries.

If this message body was read-only, calling this method leaves the message body in the same state as an empty body in a newly created message.

Reimplemented from TIBCO.EMS.Message.

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

Implements the Clone method from ICloneable interface

Returns
returns the cloned object

Reimplemented from TIBCO.EMS.Message.

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

Return a string representation of the message

Returns
string representation of the message

Property Documentation

Object TIBCO.EMS.ObjectMessage.TheObject
getset

Gets or sets the object content of the ObjectMessage.

An object written to an ObjectMessage is not portable. I.e. An object set by an .NET EMS client will only be interpreted correctly by another .NET EMS client.

Exceptions
MessageFormatExceptionIf the serialization or deserialization of the object failed

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