Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
注册 QAMessageListener 对象以使用消息选择程序异步接收 QAnywhere 消息。
void QAManagerBase.setMessageListenerBySelector( String address, String selector, QAMessageListener listener ) throws QAException
address 用来接收消息的本地队列名称的地址,或监听 QAnywhere 系统消息的系统。
selector 用于过滤要接收的消息的选择程序。
listener 监听器。
QAException 类 如果注册 QAMessageListener 对象时存在问题(如因为已有一个指派给给定队列的监听器对象),则抛出异常。
address 参数指定用于接收消息的本地队列名称。只能向给定队列指派一个监听器对象。selector 参数指定用于过滤在给定地址上接收的消息的选择程序。如果想要监听 QAnywhere 系统消息(包括推式通知和网络状态更改),请指定 "system" 作为队列名称。
使用此方法异步接收消息。