Progress
External Program
Interfaces


Methods In the Message Objects

Table C–3 provides a brief description of the methods in the Message Objects. For complete information and syntax, see the "Message Objects" section in "Accessing SonicMQ Messaging From the Progress 4GL"or the "4GL–JMS API Alphabetical Reference" section in this appendix.

Table C–3: Methods In the Message Objects
Function or Procedure
Purpose

Procedure adds any arbitrary part to a multipart message.

Procedure adds a Sonic-message part to a multipart message.

Procedure adds a text part to a multipart message.

Procedure, called in write-only mode, to append text to the message in several calls to overcome the Progress 32K limit on the number of characters.
Procedure clears the body of a message, keeping header and property values unchanged and transfers a StreamMessage, TextMessage, XMLMessage, and BytesMessage to write-only mode.
Procedure clears the properties of the message, keeping header and body values unchanged.
Procedure creates a multipart message and returns a handle to it.
Procedure deletes a message.
Function returns true if an application retrieved the last item of a stream, the last bytes segment, or last text segment.
Function returns the number of bytes in a BytesMessage.
Function converts from a JMS data type and gets a bytes item from a MapMessage.

Function retrieves a binary part corresponding to the index and returns the content type as a MEMPTR

Function gets a bytes item from a MapMessage.

Function returns an item of any data type except bytes from a MapMessage.
Function returns the total number of characters in a message.
Function returns message properties of any data type.
Function returns any numeric item from a MapMessage.
Function gets any numeric item from a MapMessage.
Function returns any numeric message property.
Function returns int, short, or bytes items from a MapMessage.
Function returns int, short, or bytes message properties.
Function returns the data type of an item in a MapMessage. UNKNOWN is returned if the item does not exist.
Function returns the correlationID. This value is application-defined, typically the ID of the message replied to.
Function returns a proprietary (JMS provider-dependent) correlation ID.
Function returns the delivery mode.
Function returns the name of the destination this message was sent to.
Function returns the expiration time (GMT).
Function returns the message ID, a unique ID that the JMS server assigns to each message.
Function returns priority values in the range of 0–9.
Function returns true (at the receiver side) if this is not the first delivery of this message.
Function returns the reply destination.
Function returns the message sending time, which is the difference in milliseconds between the message creation time and midnight, January 1, 1970 UTC.
Function returns a proprietary (JMS provider-dependent) type name.
Function returns a LOGICAL value indicating whether load balancing is enabled — that is, whether the client is willing to have a connect request redirected to another broker within a SonicMQ cluster.
Function returns a BOOLEAN item by name from a MapMessage.
Function returns a boolean message property.
Function returns a comma-separated list of the item names in a MapMessage.
Function returns a reference to a MEMPTR variable that contains exactly all the bytes of a BytesMessage and implicitly calls reset.
Function returns the SonicMQ Adapter message type: TextMessage, MapMessage, StreamMessage, BytesMessage, HeaderMessage, or XMLMessage.
Function retrieves a handle to the message part corresponding to the index and returns the content type as a character string.
Function returns the SonicMQ Adapter message type: TextMessage, MapMessage, StreamMessage, BytesMessage, HeaderMessage, XMLMessage, or multipartMessage.
Function returns the number of parts in a multipart message.
Function returns a comma-separated list of the properties of a message.
Function returns the message property’s data type. UNKNOWN is returned if the property was not set in the message.
Function returns “queue,” “topic,” or UNKNOWN.
Function returns a LOGICAL value indicating how a fail-over list is used — that is, whether clients try to connect to brokers in a connection list sequentially or randomly.
Function returns all the text in the message and then implicitly calls reset.
Function can be called in read-only mode to get the next text segment when handling large messages.
Function retrieves the text part corresponding to the index and returns the content type as a CHARACTER string.
Function can be called in read-only mode to return the next text segment when handling large messages.function can be called in read-only mode to return the next text segment when handling large messagesfunction can be called in read-only mode to return the next text segment when handling large messagesfunction can be called in read-only mode to return the next text segment when handling large messages
Function returns true if the JMSreplyTo header was set.
Function returns TRUE if the part corresponding to a specified index is a SonicMQ message.
This procedure handles incoming JMS and error messages.
Function moves the cursor to the next data item and returns its data type: UNKNOWN, boolean, byte, short, char, int, long, float, double, string, or bytes.
Function returns bytes data from the body of a StreamMessage. It can be called in read-only mode to return the next bytes segment in a BytesMessage.
Function returns any message data except bytes data from the body of a StreamMessage.
Function returns any numeric data from the body of a StreamMessage.
Function returns int, short, and bytes data from the body of a StreamMessage.
Function returns boolean data from the body of a StreamMessage.
Procedure changes the mode of a message from write-only to read-only mode and positions the cursor before the first segment.
Procedure converts data in a MapMessage to the JMS boolean data type.
Procedure sets a boolean message property. An UNKNOWN value is considered a false value.
Procedure converts data in a MapMessage to the JMS bytes data type; byte values are -128 to 127. The server returns a NumberFormatException message for a value overflow.
Procedure sets a bytes property in a message; the values range from –128 to 127. The server returns a NumberFormatException message for a value overflow.
This procedure converts data in a MapMessage to the JMS bytes data type.
Procedure converts data in a MapMessage to the JMS char data type; the number of characters in the char value must be one.
Procedure converts data in a MapMessage to the JMS double data type.
Procedure sets a double property in a message.
Procedure converts data in a MapMessage to the JMS float data type.
Procedure sets a float property in a message.
Procedure converts data in a MapMessage to the JMS int data type.
Procedure sets a JMS int property in a message.
Procedure sets the correlationID. This value is application-defined; typically the ID of the message replied to.
Procedure sets the bytes correlationID, a proprietary (JMS provider-dependent) value. When accessing SonicMQ, the bytesCorrelationID field can be used for storing application-defined values.
Procedure sets a destination for replies.
Procedure sets the type name, which is proprietary (JMS provider-dependent).
Procedure sets long data; any fractional part of the DECIMAL value is truncated.
Procedure sets a long message property; any fractional part of the DECIMAL value is truncated.
Procedure sets the specified number of bytes from the MEMPTR variable starting at startIndex (the first byte is 1) in a BytesMessage.
Procedure turns the automatic display of synchronous errors and conditions on and off.
Procedure sets the type of the destination specified by setJMSReplyTo; the type can be queue or topic.
Procedure converts data in a MapMessage to the JMS short data type. The server returns a NumberFormatException message for a value overflow.
Procedure converts data to the JMS short data type in a MapMessage.
Procedure sets a short message property. The server returns a NumberFormatException message for a value overflow.
Procedure converts data in a MapMessage to the JMS String data type.
Procedure converts data in a MapMessage to the JMS String data type.
Procedure sets a String property in a message.
Procedure clears the message body and sets a new text value.
Procedure writes boolean data to the body of a StreamMessage. An UNKNOWN value is considered false.
Procedure writes bytes data to the body of a StreamMessage; byte values are –128 to 127. The server returns a NumberFormatException message for a value overflow.
Procedure writes bytes data to the body of a StreamMessage. Procedure can be called in write-only mode to write additional bytes segments to a BytesMessage and work around the RAW data type limit of 32K.
Procedure writes JMS char data to a message; the number of characters in the char value must be one.
Procedure writes double data to a StreamMessage.
Procedure writes float data to a StreamMessage.
Procedure writes JMS int data to a StreamMessage.
Procedure writes long data to a StreamMessage. The fractional part of the DECIMAL value is truncated.
Procedure writes short data to a StreamMessage. The server returns a NumberFormatException message for a value overflow.
Procedure writes String data to a StreamMessage.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095