Provides fields storing standard message property names.
Public Class MessageProperties
public class MessageProperties
All members of MessageProperties class, including all inherited members.
Name | Description |
---|---|
For system queue messages, the network adapter that is being used to connect to the QAnywhere server. | |
This property name refers to a delimited list of network adapters that can be used to connect to the QAnywhere server. | |
This property name refers to the number of attempts that have been made so far to deliver the message. | |
For system queue messages, the IP address of the network adapter that is being used to connect to the QAnywhere server. | |
For system queue messages, the MAC address of the network adapter that is being used to connect to the QAnywhere server. | |
This property name refers to MessageType values associated with a QAnywhere message. | |
This property name refers to the state of the network connection. | |
This property name refers to the message store ID of the originator of the message. | |
For system queue messages, the RAS entry name that is being used to connect to the QAnywhere server. | |
For system queue messages, a delimited list of RAS entry names that can be used to connect to the QAnywhere server. | |
This property name refers to the current status of the message. | |
This property name refers to the time at which the message became its current status. | |
This property name refers to the current transmission status of the message. |
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 QAnywhere messages.
Assume you have the following QAMessage instance:
QAMessage msg = mgr.createTextMessage(); |
The following example gets the value corresponding to MessageProperties.MSG_TYPE using the QAMessage.GetIntProperty method. The MessageType enumeration maps the integer result to an appropriate message type.
msg_type = (MessageType)t_msg.GetIntProperty( MessageProperties.MSG_TYPE ); |
The following example shows the onSystemMessage method which is used to handle QAnywhere system messages. The message type is evaluated using MessageProperties.MSG_TYPE variable and the QAMessage.GetIntProperty method. A delimited list of RAS entry names is obtained using MessageProperties.RASNAMES and the QAMessage.GetStringProperty method.
private void onSystemMessage(QAMessage msg) { QATextMessage t_msg; MessageType msg_type; String network_adapters; String network_names; String network_info; t_msg = (QATextMessage)msg; if( t_msg != null ) { // Evaluate 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 += String.Format( _resources.GetString( "NetworkAdapter" ), network_adapters ); } network_names = t_msg.GetStringProperty( MessageProperties.RASNAMES ); //... } } } |
ADAPTER field
ADAPTERS field
DELIVERY_COUNT field
IP field
MAC field
MSG_TYPE field
NETWORK_STATUS field
ORIGINATOR field
RAS field
RASNAMES field
STATUS field
STATUS_TIME field
TRANSMISSION_STATUS field
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |