How can events be filtered?
Often times a consumer is only interested in some of the events produced by a supplier. For example, consider a stock portfolio object. It is interested in stock change events for particular stocks and when a stock price goes above or below a certain price. It does not want to receive all stock change events for all stocks.
The first filtering mechanism is the event channel itself. By using multiple event channels to represent different types of events, the space of events is partitioned. Thus, the suppliers only connect to the event channels that they are interested in. In the above example, we might have one event channel per stock.
To achieve this kind of filter in the CORBA Event Service, the application developer simply implements a simple filter. The filter is a consumer of events that is attached to the event channel. If the filter evaluates to true, it passes the event on to its consumer. If the filter evaluates to false, it simply drops the event. In this fashion, the consumer only receives the events of interest. Obviously the filter should be located near the channel.he slow communication link once.