TIBCO Enterprise Message Service extends the MapMessage and StreamMessage body types in two ways. These extensions allow TIBCO Enterprise Message Service to exchange messages with TIBCO Rendezvous and ActiveEnterprise formats that have certain features not available within the JMS specification.
● You can insert another MapMessage or StreamMessage instance as a submessage into a MapMessage or StreamMessage, generating a series of nested messages, instead of a flat message.These extensions add considerable flexibility to the two body types. However, they are extensions and therefore not compliant with JMS specifications. Extended messages are tagged as extensions with the vendor property tag JMS_TIBCO_MSG_EXT.For more information on message compatibility with Rendezvous messages, see Message Body in TIBCO Enterprise Message Service User’s Guide.tibems_status tibemsStreamMsg_Create(tibemsStreamMsg* message );
message has usage pointer.
When your application creates a message, it also allocates storage for that message. This storage must subsequently be freed by a call to tibemsMsg_Destroy.tibemsMsgField* field );
Each successful call to tibemsStreamMsg_ReadField allocates storage for a tibemsMsgField. Programs that call tibemsStreamMsg_ReadField must subsequently call this function to free that allocated storage.This function does not need to be called after tibemsMapMsg_GetField.tibemsStreamMsg_Readtibems_status tibemsStreamMsg_ReadBoolean(tibemsStreamMsg message,tibems_bool* value );tibems_status tibemsStreamMsg_ReadByte(tibemsStreamMsg message,tibems_byte* value );tibems_status tibemsStreamMsg_ReadChar(tibemsStreamMsg message,tibems_wchar* value );tibems_status tibemsStreamMsg_ReadDouble(tibemsStreamMsg message,tibems_double* value );tibems_status tibemsStreamMsg_ReadFloat(tibemsStreamMsg message,tibems_float* value );tibems_status tibemsStreamMsg_ReadInt(tibemsStreamMsg message,tibems_int* value );tibems_status tibemsStreamMsg_ReadLong(tibemsStreamMsg message,tibems_long* value );tibems_status tibemsStreamMsg_ReadShort(tibemsStreamMsg message,tibems_short* value );tibems_status tibemsStreamMsg_ReadString(tibemsStreamMsg message,
message has usage pointer.value has usage pointer only in tibemsStreamMsg_ReadString (but not in the other calls documented in this group).
Each call reads a unit of data from the stream, and advances the read position so that the next read call gets the next datum. (Other read functions are documented on separate pages.)tibems_status tibemsStreamMsg_ReadBytes(tibemsStreamMsg message,tibems_uint* length );
message and value have usage pointer.
The function stores a pointer to the byte sequence (within the message) in this location. Each call reads bytes from the stream into the byte array, and advances the read position so that the next read call gets the next datum. (Other read functions are documented on separate pages.)This call uses the length parameter to return the actual number of bytes read. When the call cannot read even one byte, the length is -1.A program that calls this function must call it repeatedly until it returns -1, indicating that the program has extracted the complete set of bytes. Only then may the program call another read function.tibems_status tibemsStreamMsg_ReadField(tibemsStreamMsg message,tibemsMsgField* value );
message has usage pointer.
Each call reads a field from the stream, and advances the read position so that the next read call gets the next datum. (Other read functions are documented on separate pages.)Each successful call to tibemsStreamMsg_ReadField creates a field struct. Field structs can contain data in allocated storage. Programs that call tibemsStreamMsg_ReadField must subsequently call tibemsStreamMsg_FreeField to free that allocated storage.tibems_status tibemsStreamMsg_Reset(tibemsStreamMsg message );
message has usage pointer.
This call prepares a message body for reading, as if the message were newly received. Contrast tibemsMsg_ClearBody on page 26, which clears a message body in preparation for writing, as if it were newly created.tibemsStreamMsg_WriteSingle Value
C Declarationstibems_status tibemsStreamMsg_WriteBoolean(tibemsStreamMsg message,tibems_bool value );tibems_status tibemsStreamMsg_WriteByte(tibemsStreamMsg message,tibems_byte value );tibems_status tibemsStreamMsg_WriteChar(tibemsStreamMsg message,tibems_wchar value );tibems_status tibemsStreamMsg_WriteDouble(tibemsStreamMsg message,tibems_double value );tibems_status tibemsStreamMsg_WriteFloat(tibemsStreamMsg message,tibems_float value );tibems_status tibemsStreamMsg_WriteInt(tibemsStreamMsg message,tibems_int value );tibems_status tibemsStreamMsg_WriteLong(tibemsStreamMsg message,tibems_long value );tibems_status tibemsStreamMsg_WriteShort(tibemsStreamMsg message,tibems_short value );tibems_status tibemsStreamMsg_WriteString(tibemsStreamMsg message,Array
C Declarationstibems_status tibemsStreamMsg_WriteDoubleArray(tibemsMsg message,const tibems_double* value,tibems_int count );tibems_status tibemsStreamMsg_WriteFloatArray(tibemsMsg message,const tibems_float* value,tibems_int count );tibems_status tibemsStreamMsg_WriteIntArray(tibemsMsg message,const tibems_int* value,tibems_int count );tibems_status tibemsStreamMsg_WriteLongArray(tibemsMsg message,const tibems_long* value,tibems_int count );tibems_status tibemsStreamMsg_WriteShortArray(tibemsMsg message,const tibems_short* value,tibems_int count );Nested Message C Declarationstibems_status tibemsStreamMsg_WriteMapMsg(tibemsMsg message,tibems_status tibemsStreamMsg_WriteStreamMsg(tibemsMsg message,
Nested messages are an extension of the JMS specification. Programs that use this feature are non-compliant.USING BY VALUE message,USING BY VALUE message,USING BY VALUE message,USING BY VALUE message,USING BY VALUE message,USING BY VALUE message,USING BY VALUE message,USING BY VALUE message,USING BY VALUE message,USING BY VALUE message,USING BY VALUE message,USING BY VALUE message,USING BY VALUE message,USING BY VALUE message,
message has usage pointer.value has usage pointer only in tibemsStreamMsg_WriteStreamMsg and tibemsStreamMsg_WriteMapMsg (but not in the other calls documented in this group).
Each call writes a data value to the stream, and advances the write position so that the next write call appends to the new end of the stream.tibems_status tibemsStreamMsg_WriteBytes(tibemsStreamMsg message,tibems_uint length );
message has usage pointer.
Copyright © TIBCO Software Inc. All Rights Reserved.