Features of WebSphere MQ C++

WebSphere(R) MQ C++ provides the following features:

The following Booch class diagrams show that all the classes are broadly parallel to those WebSphere MQ entities in the procedural MQI (for example using C) that have either handles or data structures. All classes inherit from the ImqError class (see ImqError), which allows an error condition to be associated with each object.

Figure 1. WebSphere MQ C++ classes (item handling)
A Booch class diagram showing the WebSphere MQ C++ item handling classes. The CICSBridgeHeader, DeadLetterHeader, IMSBridgeHeader, ReferenceHeader, and WorkHeader classes inherit from the abstract Header class. Header and Trigger classes inherit from the abstract Item class, which cooperates with the Message class.
Figure 2. WebSphere MQ C++ classes (queue management)
A Booch class diagram showing the WebSphere MQ C++ queue management classes. The Queue, QueueManager, and Namelist classes inherit from the abstract Object class. 1 to n Objects can be managed by QueueManager, which in turn is referenced by the Channel class. Queue cooperates with the Message, GetMessageOptions, and PutMessageOptions classes. Both Queue and Message inherit from MessageTracker, and Message also inherits from the Cache class. The DistributionList class inherits from Queue, and 1 to n Queues are referenced by it.

To interpret Booch class diagrams correctly, be aware of the following:

The following classes and data types are used in the C++ method signatures of the queue management classes (see Figure 2) and the item handling classes (see Figure 1):

Entities with data structures are subsumed within appropriate object classes. Individual data structure fields (see Appendix B. MQI cross reference) are accessed with methods.

Entities with handles come under the ImqObject class hierarchy (see ImqObject) and provide encapsulated interfaces to the MQI. Objects of these classes exhibit intelligent behavior that can reduce the number of method invocations required relative to the procedural MQI. For example, you can establish and discard queue manager connections as required, or you can open a queue with appropriate options, then close it.

The ImqMessage class (see ImqMessage) encapsulates the MQMD data structure and also acts as a holding point for user data and items (see Reading messages) by providing cached buffer facilities. You can provide fixed-length buffers for user data and use the buffer many times. The amount of data present in the buffer can vary from one use to the next. Alternatively, the system can provide and manage a buffer of flexible length. Both the size of the buffer (the amount available for receipt of messages) and the amount actually used (either the number of bytes for transmission or the number of bytes actually received) become important considerations.