Sun Java System Communications Services 6 2005Q4 Event Notification Service Guide

publish_a

Purpose

Sends an asynchronous notification to the notification service.

Syntax

void publish_a (publisher_t *publisher,
                const char *event_ref,
                const char *data,
                unsigned int datalen,
                publisher_cb_t cbdone,
                publisher_cb_t end2end_ack,
                void *cbarg,
                unsigned long timeout);

Parameters

publisher_t

The active publisher. 

event_ref

The event reference. This is a URI identifying the modified resource. 

data

The event data. The body of the notification message. It is opaque to the notification service, which merely relays it to the events’ subscriber. 

datalen

The length in bytes of the data. 

cbdone

The callback invoked when the data has been accepted or deemed unacceptable by the notification service. What makes a notification acceptable depends on the protocol used. The protocol may choose to use the transport acknowledgment (TCP) or use its own acknowledgment response mechanism. 

end2end_ack

The callback function invoked after acknowledgment from the consumer peer (in an RENL) has been received. Used only in the context of an RENL. 

cbarg

The first argument of cbdone or end2end_ack when invoked.

timeout

The length of time to wait for an RENL to complete. 

Returns

Nothing.