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

Publish and Subscribe Dispatcher API

The Publish and Subscribe Dispatcher API includes one definition and four functions:


Note –

The only thread dispatcher supported is GDisp (libasync).


pas_dispatcher_t

Purpose

A publish and subscribe dispatcher.

Syntax

typedef struct pas_dispatcher_struct pas_dispatcher_t;

Parameters

None.

Returns

Nothing.

pas_dispatcher_new

Purpose

Creates or advertises a dispatcher.

Syntax

pas_dispatcher_t *pas_dispatcher_new (void *disp);

Parameters

dispcx

The dispatcher context. If NULL,to start dispatching notifications, the application must call pas_dispatch.

If not NULL, the dispatcher is a libasync dispatcher.

Returns

The dispatcher to use when creating publishers or subscribers (pas_dispatcher_t).

pas_dispatcher_delete

Purpose

Destroys a dispatcher created with pas_dispatcher_new.

Syntax

void pas_dispatcher_delete (pas_dispatcher_t *disp);

Parameters

disp

The event notification client environment. 

Returns

Nothing.

pas_dispatch

Purpose

Starts the dispatch loop of an event notification environment. It has no effect if the application uses its own thread pool.

Syntax

void pas_dispatch (pas_dispatcher_t *disp);

Parameters

disp

The new dispatcher. 

Returns

Nothing.

pas_shutdown

Purpose

Stops the dispatch loop of an event notification environment started with pas_dispatch. It has no effect if an application-provided dispatcher was passed to pas_dispatcher_new.

Syntax

void pas_shutdown (pas_dispatcher_t *disp);

Parameters

disp

The dispatcher context to shutdown. 

Returns

Nothing.