TibrvCmMsgCallback::onCmMsg()
Method
Declaration
virtual voidonCmMsg
(
TibrvCmListener* cmListener,
TibrvMsg& msg) = 0;
Purpose
Process inbound certified delivery messages (CM listener events).
Remarks
Implement this method to process inbound certified delivery messages.
Parameter |
Description |
|
This parameter receives the listener event. |
|
This parameter receives the inbound message. |
CM Label Information
The callback method for certified delivery messages can use CM label information to discriminate these situations:
• | If TibrvCmMsg::getSender() returns status code TIBRV_NOT_FOUND, then the message uses the reliable protocol (that is, it was sent from an ordinary transport). |
• | If TibrvCmMsg::getSender() returns a valid sender name, then the message uses the certified delivery protocol (that is, it is a labeled message, sent from a CM transport). |
Once the callback method determines that the message uses the certified delivery protocol, it can discriminate further:
— | If TibrvCmMsg::getSequence() returns status code TIBRV_NOT_FOUND, then the listener is not registered for certified delivery from the sender. |
— | If TibrvCmMsg::getSequence() returns TIBRV_OK, then a certified delivery agreement is in effect for this subject with the sender. |