Avaya Client SDK

< Back to Package Overview

Working with Capabilities

Capabilities Overview

Capabilities are a software pattern used by the Client SDK to indicate to the application what features and operations may be available at a given point in time. Capabilities are dynamic due to the distributed and asynchronous nature of the system. Therefore, an allowed capability is not a guarantee that the associated action will succeed. Capabilities indicate that the action is expected to be available, and the Client SDK provides notification when relevant capabilities change. Many services and service objects in the SDK expose capabilities that inform an application which features and operations are available based on the current state of the system. Capabilities may change based on:

Deployment:

These capabilities may change depending on the type of network elements deployed and the configuration of such network elements. For example, Conferencing9 capabilities differ from Avaya Aura Conferencing capabilities.

Configuration:

These capabilities may change based on the configuration that the application provides to the CSDK, e.g. the application may not support enhanced conferencing.

Runtime:

Availability/unavailablility of capabilities depends on the runtime execution of the service or service object, e.g. the call retrieve operation is not permitted unless the call is in the held state.

Capabilities can be used to control the visibility or enabled state of user interface elements without the application. Otherwise, tracking all the states that could affect the availability of an action may be required. For example, consider the Call.Hold(Call.CallCompletionHandler) action. Only an established call may be held provided that another action is not currently being attempted on the call. If both of these conditions are true, Call.HoldCapability.Allowed will be true. If either condition is false, Call.HoldCapability.Allowed will also be false and Call.HoldCapability.DenialReason will provide a description of why the action is unavailable. Since the values influencing this capability can change, the Call object also exposes the capabilities updated event to inform the application when the capabilities for the call object have changed.

Capabilities are a completely optional feature provided to aid in user interface development. The system supports any action method being called at any time. Applications must support success and failure handling for all operations, even if the capability indicated that the operation was allowed.

Coding with Capabilities

The Capability class is an immutable object with properties populated at the time the capability was created. When the registered listener is notified that the capabilities have changed, all existing Capabilities objects should be considered obsolete. A new Capabilities object will need to be reacquired.

The sequence diagram below shows the example of using Client SDK capabilities.

Using capabilities