MessageProperties class

Syntax
public MessageProperties
Remarks

Provides fields storing standard message property names.

The MessageProperties class provides standard message property names. You can pass MessageProperties fields to QAMessage methods used to get and set message properties.

For more information, see Introduction to QAnywhere messages

 QATextMessage * t_msg;
 

The following example gets the value corresponding to MSG_TYPE using the getIntProperty method. The MessageType enumeration maps the integer result to an appropriate message type.

 int msg_type;
 t_msg->getIntProperty( MessageProperties::MSG_TYPE, &msg_type)
 

The following example evaluates the message type and RAS names using MSG_TYPE and RASNAMES respectively.

void SystemQueueListener::onMessage(QAMessage * msg) {
    QATextMessage *  t_msg;
    TCHAR    buffer[512];
    int      len;
    int      msg_type;

    t_msg = msg->castToTextMessage();
    if (t_msg != NULL) {
        t_msg->getIntProperty(MessageProperties::MSG_TYPE, &msg_type);
        if (msg_type == MessageType::NETWORK_STATUS_NOTIFICATION) {
            // get RAS names using MessageProperties::RASNAMES
            len = t_msg->getStringProperty(MessageProperties::RASNAMES,buffer,sizeof(buffer));
        }
        // ...
    }
}
See Also

QAMessage class

Members

All members of MessageProperties, including all inherited members.


ADAPTER variable
ADAPTERS variable
DELIVERY_COUNT variable
IP variable
MAC variable
MSG_TYPE variable
NETWORK_STATUS variable
ORIGINATOR variable
RAS variable
RASNAMES variable
STATUS variable
STATUS_TIME variable
TRANSMISSION_STATUS variable