setMessageListener function

Syntax
void QAManagerBase::setMessageListener(
  qa_const_string address,
  QAMessageListener * listener
)
Parameters
  • address   The destination address that the listener applies to.

  • listener   The message listener to associate with destination address.

Remarks

Sets a message listener class to receive QAnywhere messages asynchronously.

The listener is an instance of a class implementing QAMessageListeneronMessage, the only method defined in the QAMessageListener interface. QAMessageListeneronMessage accepts a single QAMessage parameter.

The setMessageListener address parameter specifies a local queue name used to receive the message. You can only have one listener assigned to a given queue.

If you want to listen for QAnywhere system messages, including push notifications and network status changes, specify "system" as the queue name. Use this method to receive message asynchronously.

For more information, see Receiving messages asynchronously and System queue.