MessageProperties interface

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.

QAMessage msg = mgr.createTextMessage();

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

int msg_type = t_msg.getIntProperty(MessageProperties.MSG_TYPE);

The following example shows the onSystemMessage(QAMessage) method, which is used to handle QAnywhere system messages.

The message type is evaluated using MessageProperties.MSG_TYPE variable and the QAMessage.getIntProperty(String) method.

private void onSystemMessage(QAMessage msg) {
    QATextMessage    t_msg;
    int              msg_type;
    String           network_adapters;
    String           network_names;
    String           network_info;

    t_msg = (QATextMessage) msg;
    if (t_msg != null) {
        // Evaluate the message type.
        msg_type = (MessageType) t_msg.getIntProperty(MessageProperties.MSG_TYPE);

        if (msg_type == MessageType.NETWORK_STATUS_NOTIFICATION) {
            // Handle network status notification.
            network_info = "";
            network_adapters = t_msg.getStringProperty(MessageProperties.ADAPTERS);
            if (network_adapters != null && network_adapters.length > 0) {
                network_info += network_adapters;
            }
            network_names = t_msg.getStringProperty(MessageProperties.RASNAMES);
            //...
        }
    }
 }
Members

All members of ianywhere.qanywhere.client.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