awDeliverPartialReplyEvents
BrokerError awDeliverPartialReplyEvents(
BrokerClient client,
BrokerEvent request_event,
int n,
BrokerEvent *events,
int flag,
int *reply_token);
client | The Broker client that is delivering the events. |
request_event | The original request event. Used to determine the client ID of the sender of the original request. |
n | The number of events in the reply. |
events | The array of reply events that are to be delivered. |
flag | Indicates if there are more events to be sent as part of this reply. Must be one of the following: AW_REPLY_FLAG_START AW_REPLY_FLAG_CONTINUE AW_REPLY_FLAG_START_AND_END AW_REPLY_FLAG_END |
reply_token | The address of a int that can be used by the function as temporary storage between calls. |
Delivers an event array of size n to the Broker to be delivered to the Broker client that originally published request_event. No error will be returned if the Broker client using that ID no longer exists. Either all of the events or none of them will be delivered. This function properly sets the tag, appSeqn, and appLastSeqn envelope fields.
If the trackId envelope field was set on request_event, that value is copied to the reply events. If the request_event trackId envelope field was not set, the pubId envelope field from the request_event will be used instead.
This function is used to deliver parts of a set of replies in groups. When called the first time, flag should be AW_REPLY_FLAG_START. After doing this, additional calls can be made with other flag values. During intermediate replies, flag should be AW_REPLY_FLAG_CONTINUE. On the final call, flag should be AW_REPLY_FLAG_END. It is important that the ending call be made with n is set to at least 1.
Calling this function with flag set to AW_REPLY_FLAG_START_AND_END allows the entire result to be passed to this function in one call.
The reply_token value will be set and modified by this function during calls. It exists to carry information between calls and has no meaning to the caller.
Note:
An error will not be returned if the recipient, represented by the pubId field in request_event, no longer exists.
Possible BrokerError major codes | Meaning |
AW_ERROR_INVALID_CLIENT | The Broker client, represented by the client parameter, has been destroyed or disconnected. |
AW_ERROR_INVALID_EVENT | The request_event or one of the reply events is invalid, request_event was not received from the Broker, or one the reply events does not match its type definition. |
AW_ERROR_NO_PERMISSION | The client does not have permission to publish the reply_event type. |
AW_ERROR_NULL_PARAM | The parameter events or reply_token is NULL. |
AW_ERROR_OUT_OF_RANGE | The parameter n is less than zero or flag does not contain a valid value. |
AW_ERROR_UNKNOWN_EVENT_TYPE | The event type for one of the reply events does not exist on the Broker. |
See also: