Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | Using the Callback Model | Understanding Callbacks | Using Callbacks
 
Using Callbacks
Follow these steps to use the callback processing model:
1. Use awCanSubscribe to verify that the desired subscriptions are allowed.
2. Use one or more of the following to register the subscriptions:
*awNewSubscription
*awNewSubscriptionWithId
*awNewSubscriptionFromStruct
*awNewSubscriptionsFromStructs
3. Use awRegisterCallback to register a general callback function.
4. Next, you can optionally register any specific callback functions you desire, using:
*awRegisterCallbackForSubId
*awRegisterCallbackForTag
5. Process events using one of the following:
*awDispatch
*awMainLoop
*awThreadedCallbacks
6. Cancel all the callbacks using:
*awCancelCallbacks
*awCancellCallbackForSubId
*awCancelCallbackForTag
7. Cancel all the subscriptions using:
*awCancelSubscription
*awCancelSubscriptionFromStruct
*awCancelSubscriptionsFromStructs