Back to Notification Service Examples Page Back

Notification Example: Supplier-Consumer Using Push Model

Description

The Supplier-Consumer example contains the worked example code from the OpenFusion Notification Service manual. The example illustrates how to create a simple supplier and consumer that use the push model to send and receive events. The supplier sends events to the Notification Service and the consumer receives them.

This example consists of two components:

MyPushSupplier.java: The Supplier uses the simple push model to send events to the event channel. MyPushSupplier will perform the following tasks:

MyPushConsumer.java: MyPushConsumer uses the simple push model to receive messages from the Notification Service. The MyPushConsumer will perform the following tasks:

How To Run This Example

  1. Make sure your PATH contains the bin directory of the JDK and the bin directory of the OpenFusion distribution.
  2. Make sure the appropriate ORB daemon is running.
  3. Start the Notification Service.

    From the command line:

    server -start NotificationService

    From the Administration Manager:

    Start the Admin Manager, right click on the NotificationService node and select Start from the pop-up menu.

  4. Start the Consumer:
    run com.prismt.cos.CosNotification.examples.Push.MyPushConsumer
  5. In a new window start the Supplier:
    run com.prismt.cos.CosNotification.examples.Push.MyPushSupplier

Entering Ctrl-C in each window will stop the processes.


PrismTech TOP
Top