Previous Notification Service Manager Next

Using the Notification Service Manager

Start the Notification Service Manager from the command line with the following command:

% run com.prismt.cos.treebrowser.notification.

NotificationServiceBrowser -name NotificationService

The Structured Consumer Manager can be started with the following command:

% run com.prismt.cos.CosNotification.util.Consumer

-name NotificationService

The Structured Supplier Manager can be started with the following command:

% run com.prismt.cos.CosNotification.util.Supplier

-name NotificationService

The Notification Service must be running before any of the Managers can be started.

The Notification Service Manager

The Notification Service Manager displays information about the channels that have been created by an EventChannelFactory object. When the manager is first run, and providing no developers have created Event Channels programmatically, the manager will display the default service EventChannelFactory object, below the Notification Service icon itself.

If the ChannelConfigurator Object is present, a saved configuration may be loaded.

Notification Service Hierarchy

The left-hand pane of the Notification Service browser displays the Notification Service object hierarchy.
Notification Service Nodes  

Icon

Object


Event Channel Factory

The root node. Also used to show the Default Filter Factory parent node and for Filter Factory objects.


Channel

Shows the unique identification number and the name of the channel interface.


Supplier Admins

Parent node for all supplier admins.


Consumer Admins

Parent Node for all consumer admins.


Supplier Admin

Shows the unique identification number and the name of the supplier admin interface.


Consumer Admin

Shows the unique identification number and the name of the consumer admin interface.


Filters

Parent node for event filters.


Proxy Push Suppliers

Parent Node for Proxy Suppliers.


Proxy Push Consumers

Parent node for Proxy Consumers.


Proxy Push Supplier

Shows the unique identification number and the name of the proxy interface.


Proxy Push Consumer

Shows the unique identification number and the name of the proxy interface.

Notification Service Details

The right hand pane will display the details of the individual objects in the hierarchy when they are selected. If no node is selected, or if a node which has no associated details is selected, this box will be empty and contain the message There is no information to display.

Setting up an Event Channel

The core component of the Notification Service is the Event Channel. The Event Channel handles the transmission of events over the distributed network provided by the ORB implementation being used.

Creating an Event Channel

  1. To create an Event channel, right-click on the Event Channel Factory node in the hierarchy pane of the browser and select Create Channel.
  2. A new Event Channel instance will be created. If the Event Channel is selected in the hierarchy pane, the details about its ID and Class name are displayed at the top, and a tabbed pane with the current Admin and QoS properties and their values are shown. Details about Event Channel properties are described next.

Setting Properties on an Event Channel

Default properties can be set for an Event Channel. This enables the user to specify how the channel will respond to the events it receives. There are two types of property: Admin properties and QoS properties.

Admin Property Settings

Administrative properties refer to property settings that may be applied only to event channel objects. These properties are usually set when an event channel is first created. These settings are typically static in nature although they may be changed during the lifetime of the channel object. The standard administrative properties which can be set through the Notification Service Manager are:

See Administrative Properties for a description of these properties.

QoS Property Settings

The QoS properties which can be set on a event channel through the Notification Service Manager are:

See Quality of Service Properties for a description of these properties.

Setting up a Supplier or Consumer Admin

A supplier admin is a representation of a SupplierAdmin object created by a particular event channel. A consumer admin is a representation of a ConsumerAdmin object created by a particular event channel. Every channel is created with a default SupplierAdmin and ConsumerAdmin object, which are given IDs of zero. To view these, expand the tree in the left pane.

If the user selects either of the default Supplier or Consumer Admin objects in the hierarchy, then the right panel will display details about these. At the top of the pane there is information about the object selected: its ID, Class, Channel and its default filter operator OR. Beneath this is a tabbed panel. One tab displays the QoS Settings associated with the object, and the other tab displays Subscribed Types (for a Consumer Admin) or Offered Types (for a Supplier Admin).

QoS Settings

The following QoS properties can be set for SupplierAdmin and ConsumerAdmin objects:

See Quality of Service Properties for a description of these properties.

Admin Filters

Administration objects and all of the proxy objects in the Notification Service inherit the FilterAdmin interface. This means that all of these objects can have filters attached. Each object which can have filters attached contains a child node, Filters. The Filters node contains children that represent the individual filters that have been created for that object.

Filter Settings

One use of filters is to narrow the sorts of events received by Consumer objects. This is done by applying constraints to Supplier and Consumer Admin objects. These constraints can be specified by using the extended Trader Constraint Language (TCL). To locate the Filter section beneath the Supplier and Consumer Admin objects, expand the hierarchies below each.

Custom Filters

A custom filter is a filter which is not based on the standard grammar (TCL) but is created via a custom filter implementation class. This class must implement the FilterOperations interface and must be available on the CLASSPATH. The class must be specified when the filter is created, as described in the following section.

Creating a New Filter

  1. To create a new filter object, right-click on the Filters icon in the hierarchy tree beneath either the Admin or Proxy object. Select the option Add Filter from the pop-up menu. The Add Filter dialog is displayed.


  1. Select the required filter grammar from the drop-down list. Or, if a custom filter is required, type the name of the custom filter implementation class into the text box.
  2. Click the OK button.
  3. A new filter object line will appear in the hierarchy. Select this line to view the filter details in the right-hand pane.


At the top of this filter is a pane containing the filter ID, the IDL Class on which the filter is based, and the Grammar with which it will be constructed. Below this is a split panel. To the left is a pane where any number of filter constraints can be added and removed. To the right is another pane with the details of the constraint currently selected in the left pane.


If a filter is based on a custom filter implementation class which does not support constraints, the constraint-related controls (Add, Remove) will be disabled.

Adding a Constraint

  1. Add a new constraint by clicking the Add button in the left pane. This displays the Add Constraint dialog.


Each constraint is automatically assigned an ID number. When the constraint is first added, the ID text box will be blank.

Constraint expressions are added using the Expression field and the Event Types table. Steps 2, 3, and 4 illustrate this using the following constraint expression as an example:

(($domain_type == 'Telecommunications' and 
  $type_name == 'CommunicationsAlarm') or
  $domain_type == 'Healthcare' and
  $type_name == 'VitalSigns')) and severity == 3

This expression could be added directly into the Expression text box. However it is easier to add the domain and type names of the events into the Event Types table.

  1. Enter the expression severity == 3 into the Expression text box.
  2. Click the Add button below the Event Types table. A new row will now appear in the table. Enter Telecommunications into the Domain Name column and CommunicationsAlarm into the Type Name column.
  3. Click the Add button below the Event Types table and enter Healthcare and VitalSigns into the Domain Name and Type Name columns.
  4. Click the OK button once the full constraint expression has been entered.
  5. To complete the process of adding a constraint, click the Save button in the Constraints panel. The constraint will now be stored.

Removing a Filter

To remove a filter object, right-click on the Filters icon in the hierarchy tree beneath the required Supplier or Consumer Admin object. Select Destroy Filter from the pop-up menu. A warning dialog will appear to confirm that the filter will now be destroyed and removed from the hierarchy tree.

Removing a Constraint

  1. To remove a constraint, select the constraint in the Constraints list.
  2. Click the Remove button below it. The constraint will now disappear from the list. Click the Remove All button to remove all constraints from the filter.

Setting Proxy Instances

Supplier and Consumer Proxy objects are shown in the Notification Service Browser beneath Proxy Nodes in the hierarchy panel.. A Notification Service may have one or more Proxy instances. These Proxy instances are created using the Supplier or Consumer Admin interfaces.

Proxy instances are used to connect suppliers and consumers to the Event Channel. A supplier connects via a Proxy Consumer, which is obtained from a Supplier Admin. A consumer connects via a Proxy Supplier, which is obtained from a Consumer Admin.


QoS Settings

The QoS properties which can be set on a Proxy object through the Notification Service Manager are:

Some of these Qos properties are not available for all types of Proxy object.

See Quality of Service Properties for a description of these properties.

Creating a New Proxy Object

Supplier Admin objects are used to create proxy consumer objects for Supplier clients. Consumer Admin objects are used to create proxy supplier objects for Consumer clients.

  1. To create a new Proxy Object, select the relevant node in the Notification browser hierarchy pane:
  1. Right-click on the line in the hierarchy tree and select the Obtain New Proxy option from the pop-up menu.
  2. Select the Client Type from the list box: Structured, or Sequence.
  3. Click the OK button to create the proxy. A new proxy instance will appear in the tree below the node.

Proxy Filters

Proxy objects like Admin objects can have filter objects associated with them. Applying filters to Proxy objects in the Notification Browser is essentially the same process as applying them to Admin objects. Refer to the section Filter Settings for details.

Upon receipt of each event, the Proxy invokes the appropriate match operation on each of its associated filter objects. The match operation takes the contents of the event as input and returns a boolean result. A FALSE value is returned only when none of the constraints in the filter objects are satisfied by the event, otherwise TRUE is returned. Where the Proxy has multiple filter objects associated with it, it will invoke match on each in turn until either one returns TRUE or all have returned FALSE. Whenever the result of all match operations evaluates FALSE, then the event is discarded.

Testing Event Delivery

The Notification Browser provides facilities for testing the communication between objects in the Notification Service. Once Event Channels are available, the user can configure and create events and send them using built-in Structured Supplier and Consumer clients.

To use the event delivery test clients, the Notification Service requires the following objects to be configured and available.

Creating the Test Clients

Once the Notification Service is running and configured correctly, the clients can be created.

Configuring the Test Clients

Configuring the Structured Supplier

The manager is split into two panes; the Status pane and the Events pane. The Status pane displays information about the current status of the supplier connection through its proxy and admin objects. The Events pane shows the events being transmitted by the supplier.

The Events pane can be cleared by right clicking on the window and selecting the Clear option from the pop-up menu.


Configuring the Structured Consumer

The manager is split into two panes; the Status pane and the Events pane. The Status pane displays information about the current status of the consumer connection through its proxy and admin objects. The Events pane shows the events being received by the consumer.

The Events pane can be cleared by right clicking on the window and selecting the Clear option from the pop-up menu.


Connecting the Structured Supplier

When the Structured Supplier Manager is invoked, the Structured Supplier client resolves the Notification Service.

  1. Connect the Structured Supplier to the Notification Service by clicking on the Connect Supplier icon in the tool bar. You will then be prompted to select the identifier of the Event Channel and Supplier Admin. If there is more than one Event Channel or more than one Supplier Admin available then you can select the appropriate identifiers from the drop-down lists.
  2. Select a Channel and Admin and click OK. The Structured Supplier client will now be connected to the Notification Service and will create a proxy automatically.

Connecting the Structured Consumer

When the Structured Consumer Manager is invoked, the Structured Consumer client resolves the Notification Service.

  1. Connect the Structured Consumer to the Notification Service by clicking on the Connect Consumer icon in the tool bar. You will then be prompted to select the identifier of the Event Channel and Consumer Admin. If there is more than one Event Channel or more than one Consumer Admin available then you can select the appropriate identifiers from the drop-down lists.
  2. Select a Channel and Admin and click on OK. The Structured Consumer client will now be connected to the Notification Service and will create a proxy.

Creating Test Events

The final stage of configuration is to create events to transmit over the Notification Service.

  1. Click on the Structured Supplier Manager tab in the browser, and click on the Configure Events tool bar button. The Configure Events dialog box is displayed.


The Configure Events dialog is separated into two panes. The Event Sequence contains a list of the events to be transmitted. The Event Communication allows the user to configure the event transmission mechanism. The Number of Loops field expects an integer for the number of times that the batch of events in the Event Sequence table will be transmitted across the Event Channel. In normal circumstances events are usually transmitted once only, but for testing purposes this can be increased. The Event Interval field allows the user to specify, in milliseconds, the interval between the transmission of the event batches listed in the Event Sequence table.

  1. Enter the value of 10 into the Number of Loops field and 100 into the Event Interval field. This will instruct the Notification Service to transmit the event sequence ten times, at intervals of one every one tenth of a second.
  2. Click the Add button in the Event Sequence pane. This gives a dialog box for creating structured events.


  1. Enter Healthcare into the Domain field of the Fixed Header section, and VitalSigns into the Type field. Enter an identifier for the Event instance (for example, my_vital_signs_event_1).
  2. Click the Add button in the Filterable Body section of the dialog. Enter the property severity into the Name field and switch the data type to short in the Type field. Finally set the value to 3 in the Value field. Click OK. The Filterable Body will now contain the new property.
  3. Click OK to load the event into the Event Sequence table of the Configure Events dialog.
  4. Repeat step 3 through step 6 as before, but give this event a different identifier and set the severity to 4.
  5. To save a configured event sequence for use at a later date, click the Save button. To load events select the Load button and load a previously saved file. For this exercise click on OK.

Transmitting Test Events

  1. To begin transmitting the events, click the Send Events button on the tool bar.
  2. If you examine the Structured Supplier Manager you should notice the events being transmitted in the Events pane.
  3. If you switch to the tab of the Structured Consumer Manager you will notice the events being received in the Events window.

Filter Events

The next example will demonstrate the use of filters on event transmission.

  1. Select the Notification Service Manager window and create a new Filter object on the Supplier Admin object.
  2. Create a new constraint.
  3. Add the expression $severity != 3, and add the domain Healthcare and type VitalSigns to the Event Types table. This will create a filter to accept only Healthcare/Vital Signs events whose severity is not equal (!=) to 3. Property variables in constraint expressions must always be preceded by the $ sign.
  4. Clear the Events panes in the Structured Supplier and Consumer Manager windows and click the Send Events button again.
  5. Examine the Events pane in the Structured Supplier Manager. Both events are transmitted to the Event Channel.
  6. Now examine the Events pane in the Structured Consumer Manager. You should notice that only the event with severity==4 is being received by the Consumer client. The event with severity==3 is filtered out due to the constraint created on the Supplier Admin in step 3.

Destroying Proxy Objects

Proxy objects are destroyed if the Disconnect button is clicked or if the browser is closed.



Previous Notification Service Manager Next