Avaya Client Services API Reference (Windows)
Avaya Client Services API Reference (Windows)
Avaya.ClientServices
DataRetrievalWatcher(T, E) Class
DataRetrievalWatcher(T, E) Constructor
DataRetrievalWatcher(T, E) Properties
DataRetrievalWatcher(T, E) Methods
DataRetrievalWatcher(T, E) Events

DataRetrievalWatcher T, E Class

This class defines an interface that client applications use to perform data retrieval operations for both static and dynamic collections of objects within the SDK.
Inheritance Hierarchy
System
Object
Avaya.ClientServices
DataRetrievalWatcher
T, E
More...

Namespace: Avaya.ClientServices
Assembly: AvayaClientServices (in AvayaClientServices.dll) Version: 592.1.30.0
Syntax
C#
Copy

    public class DataRetrievalWatcher<T, E> : IDisposable
    where E : EventArgs

#### Type Parameters

T
  The type of objects in the retrieved collection.
E
  The type of error object delivered in the DataRetrievalError event.

The DataRetrievalWatcher
T, E
type exposes the following members.

Constructors

| Name | Description
--- | --- | ---
| DataRetrievalWatcher T, E | Creates a data retrieval watcher object for receiving events for data retrieval operations requested by the client application.

Top
Properties

| Name | Description
--- | --- | ---
| IsCancelled | Returns true if the retrieval operation has been cancelled.
| IsCompleted | Returns true if the retrieval operation has completed successfully.
| RequestId | The unique request ID associated with this data retrieval. If the request has not been initiated or is not outstanding, the value will be 0.

Top
Methods

| Name | Description
--- | --- | ---
| Cancel | Cancels the data retrieval operation being watched by this object.
| Dispose | Releases all resources used by the DataRetrievalWatcher T, E
| Dispose(Boolean) | Releases the unmanaged resources used by the DataRetrievalWatcher T, E and optionally releases the managed resources
| Finalize | (Overrides Object Finalize .)
| GetSnapshot | Returns a snapshot of the objects in the collection being watched by this object.

Top
Events

| Name | Description
--- | --- | ---
| DataRetrievalCollectionChanged | Indicates that the collection of data items associated with the data retrieval has changed.
| DataRetrievalDone | Indicates that data retrieval operation being watched by this object has completed.
| DataRetrievalError | Indicates that data retrieval operation being watched by this object has failed.
| DataRetrievalProgress | Provides updates on the progress of the data retrieval operation being watched by this object.

Top
Remarks
An instance of this "watcher" class is created by the client application for use in methods that initiate some form of data retrieval operation that runs asynchronously and updates a collection of objects of type "T". It can be used in cases where a static collection of objects is being retrieved (e.g. search results, etc) or for dynamically updated collections that are retrieved and then subsequently updated as events occur within the system (e.g. the active participants in a conference call).

Following creation of a DataRetrievalWatcher object, and before the object is used in a method call, the application should install event handlers on any of the events it is interested in. This allows the event handlers to be wired up prior to initiating the action that will perform the data retrieval.

For static collections, the DataRetrievalCollectionChanged event will fire as objects are added to the collection during the retrieval. Once the static collection has been completely retrieved, the DataRetrievalDone event will fire indicating that the retrieval is complete. Following this, no additional events will be signalled.

For dynamic collections, the DataRetrievalCollectionChanged event will fire as objects are added to the collection during the initial retrieval. It will also fire whenever any of the objects already in the collection are changed or removed. Once the initial retrieval of the dynamic collection has been completed, the DataRetrievalDone event will fire indicating that the initial retrieval is complete. Following this, the DataRetrievalCollectionChanged event will fire whenever any changes to the collection occur.

See Also

#### Reference

Avaya.ClientServices Namespace
Inheritance Hierarchy
System
Object
Avaya.ClientServices
DataRetrievalWatcher
T, E
Avaya.ClientServices
AddressValidationWatcher
Avaya.ClientServices
ConferenceMobileLinkDiscoveryWatcher
Avaya.ClientServices
ContactGroupRetrievalWatcher
Avaya.ClientServices
ContactRetrievalWatcher
Avaya.ClientServices
ConversationRetrievalWatcher
Avaya.ClientServices
LeaveConversationsWatcher
Avaya.ClientServices
MessageRetrievalWatcher
Avaya.ClientServices
SearchContactsWatcher
Avaya.ClientServices
SearchConversationsWatcher
Avaya.ClientServices
SearchTerminalsWatcher
Avaya.ClientServices.Spaces
SpacesRetrievalWatcher
Avaya.ClientServices
VisualVoiceMailRetrievalWatcher

© 2017 Avaya LLC. All Rights Reserved.