As described earlier, each message has a type property that defines the structure of the data property of a message. A message type can be thought of as a template, such as class, for a specific kind of message, and each message can be considered an instance of a message type. For example, NUMERIC_DATA is a message type with a predefined layout requiring a series of name-value pairs, with each string name followed immediately by a numeric value. To send numeric data to a process, the sending process constructs a message that uses the NUMERIC_DATA message type. A message type is created once and available for use as the type for any number of messages.
TIBCO SmartSockets provides hundreds of standard message types that cover a wide variety of different types of information that can be passed. TIBCO SmartSockets standard message types allow you to begin building your application quickly, without having to figure out how to define your own message types ahead of time. The messages chapter in the TIBCO SmartSockets User’s Guide lists all the standard message types that you can use when building your application. When there is no standard message type to satisfy your specific need, you can easily create a user-defined message type. Both standard and user-defined message types are handled in the same manner and can co-exist within the same program and application. Once the message type is created, messages can be constructed, sent, received, and processed through a variety of methods.
TIBCO SmartSockets™ Tutorial Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |