Previous Table of Contents Next


4.2 Event Sequenc

   unsigned long long current_version(); }; };

   ResourceChangeEvent

   This structure is passed as an event to indicate a data change. Events of this type are delivered after a data change and indicate that the client may begin reading or rereading data.

   affected

   The affected member is a sequence of resource identifiers that indicates what data has changed. If affected is empty, then the client must assume that any or all of data supplied by the data provider may have changed.

   Otherwise, affected contains one or more class identifiers. The client should assume that instances of each class have been created or destroyed, or their property values have changed.

   ResourceEventSource

   This interface allows a client to detect updates and concurrency conflicts. The interface is implemented as a singleton object.

   obtain_push_supplier()

   This operation is similar to the obtain_push_supplier() defined in the CORBA Events interface CosEventChannelAdmin::ConsumerAdmin. It is used by a client to connect its CosEventComm::PushConsumer to the data provider, through which resource change events will be delivered.

   Connection is a two step process. First, obtain_push_supplier() is invoked to return a ProxyPushSupplier. Then connect_push_consumer() is invoked on that object, passing the client’s PushConsumer.

   Events of type ResourceChangeEvent will then be passed via the PushConsumer’s push() operation.

   Disconnection is achieved by invoking disconnect_push_supplier() on the ProxyPushSupplier object.

   current_version()

   This operation is used by clients to detect concurrency conflicts. A client should query the current version before and after issuing a set of queries. If the values are equal and non zero, then the query results are taken to be self-consistent. Section 4.3, “Current Version and Transactions,? on page 4-3 elaborates on this protocol and its motivation.

   The following sequence diagram illustrates the lifecycle of an event connection between a client and a data provider.

Figure 4-1 Life Cycle Diagram