Skip Headers

Oracle® Objects for OLE Developer's Guide
10g Release 1 (10.1)

Part Number B10118-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Feedback

MonitorStart (OraAQ) Method

Applies To

OraAQ

Description

Starts a monitor thread for dequeuing the messages specified.

Arguments
Description
[in] NotificationHandler
An IDispatch interface containing the callback method (NotifyMe) which should be notified of new messages.
[in] CallbackCtx
Context-specific information that the application wants to pass to NotifyMe. This is passed into NotifyMe whenever a new message satisfying the user-criteria is dequeued.
[in][optional] MsgFilterVal
A byte array containing a value for the message filter. Ignored if MsgFilter is ORAAQ_ANY.
[in][optional] lMesgFilter MsgFilter
An integer constant specifying the selection criteria for messages. Possible values for MsgFilter are:
ORAAQ_ANY = 0 - Invoke the callback for any message that arrives on the queue. This is the default value.
ORAAQ_CONSUMER = 1 - Invoke the callback when the message intended for the consumer given in the MsgFilterValue is dequeued.
ORAAQ_MSGID = 2 - Invoke the callback when message with the identifier specified in MsgFilterValue is dequeued.
Usage

Q.MonitorStart NotificationHandler, CallbackCtx,[MesgFilterVal],[MsgFilter]

Remarks

NotifyMe Is the callback method of the notification object. The syntax of the method is:

Public Sub NotifyMe (ByVal Ctx As Variant, ByVal Msgid As Variant)

Variant
Description
[in] Ctx
Passed into MonitorStart by the application. Context-sensitve information that the application wants to pass in when messages are dequeued.
[in] Msgid
The message Id of the newly dequeued message. Msgid is null when there is an error while monitoring.

By default, the message is passed into NotifyMe in Remove mode. The default dequeue options can be overridden by setting the properties of this instance (OraAQ).

The MonitorStart method returns ORAAQ_SUCCESS or ORAAQ_FAIL.

See Monitoring Messages.