Previous Topic: SiloDataNext Topic: ConnectorEventPublisher Interface


EntityChangeEventPublisher Interface

The com.ca.connector.runtime.EntityChangePublisher interface contains the method declarations necessary to subscribe to changes in domain manager data. This interface contains the following methods:

public synchronized String subscribeToChanges(DataObject selector, EntityChangeSubscriber subscriber);

Subscribes to entity change events. Returns a String containing a subscription ID which may later be used to unregister the subscription.

After the data is retrieved and returned to CA SOI in a synchronous manner, using the get() method, it is desirable to keep the domain manager view of that data in synch with the CA SOI view. To provide this capability, a connector must implement the subscribeToChanges() method. This method launches a thread to provide asynchronous updates to the IFW through a callback for any changes to the domain manager data. The method accepts two parameters as input: a DataObject selector (SiloDataFilter) and an EntityChangeSubscriber object. To manage subscriptions, the connector creates an instance of EntityChangeSubscriptionManager. The incoming subscription is added to the manager instance, which the connector can then use to return changed data to CA SOI.

selector

Defines a filter on entities to which to subscribe.

subscriber

Defines the subscriber to entity change events and returns the subscription ID.

public synchronized void unsubscribeFromChanges(String subscriptionId);

Unsubscribes from entity change events.

subscriptionID

Defines the subscription ID to unsubscribe.