Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | API Reference | awRegister | awRegisterCallbackForTag
BrokerError awRegisterCallbackForTag(
BrokerClient client,
int tag,
BrokerBoolean cancel_when_done,
BrokerCallback func,
void *client_data);
The Broker client for which the callback is being registered.
The event tag field associated with the callback.
If set to 1 (true), the callback will be automatically cancelled when awIsLastReplyEvent returns 1 (true).
The callback function to be called to handle the event. See Defining a Callback Function.
A pointer to user-defined data that will be passed to the callback function when it is invoked.
Registers a callback function for a specified client and event tag. All events with the specified tag will be sent to the callback function func. If cancel_when_done is set to true (1), then the callback will be automatically cancelled when the awIsLastReplyEvent function returns true. Otherwise, the callback will stay in effect until explicitly cancelled.
You must register a general callback object, using the awRegisterCallback function, before calling this function.
The tag envelope field will only be set for reply events which are sent to your client in response to a request event bearing the same tag field. These reply events are delivered to your client.
If a callback has already been registered for the specified tag, it will be replaced with the new callback.
If you want to have different event types handled by their own unique callback, be sure that each event subscription uses a unique subscription identifier.
Possible BrokerError major codes
No general callback has been registered.
The client has been destroyed or disconnected.
The func is NULL.
See also: