Package com.castlabs.android.drm

## Class ProvisioningManager

- java.lang.Object
- - com.castlabs.android.drm.ProvisioningManager

-     public final class ProvisioningManager
      extends Object

  Utility class that can handle device provisioning. This class exposes static methods only and you want to use this your `DrmSessionManager` implementation.

  The primary usage of this class is to ensure that multiple DRM session can realize that provisioning requests are required and can start the provisioning process through `sendProvisionRequest(UUID, CastlabsMediaDrm, MediaDrmCallback, ProvisionedCallback)`. This method call will ensure that multiple requests are synchronized and only one requests and one response is returned to the primary, first, caller. Others will still receive a call, but not the data. This allows implementation to not worry about provisioning being requested multiple times in parallel and secondary response my cause exceptions.

  Since:
    4.0.1

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static interface` | `ProvisioningManager.ProvisionedCallback` | You need to provide an implementation of this interface when you are triggering provisioning.
    `static class` | `ProvisioningManager.ProvisionException` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static boolean` | `sendProvisionRequest​(UUID uuid, CastlabsMediaDrm mediaDrm, com.google.android.exoplayer2.drm.MediaDrmCallback mediaDrmCallback, ProvisioningManager.ProvisionedCallback callback)` | Send a provisionin request

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### sendProvisionRequest

          public static boolean sendProvisionRequest​(UUID uuid,
                                                     CastlabsMediaDrm mediaDrm,
                                                     com.google.android.exoplayer2.drm.MediaDrmCallback mediaDrmCallback,
                                                     ProvisioningManager.ProvisionedCallback callback)

      Send a provisionin request
      Parameters:
        `uuid` - The DRM Scheme UUID
        `mediaDrm` - The media drm instance
        `mediaDrmCallback` - the media drm callback implementation that executes the request.
        `callback` - The callback that wil be resolved once the requests succeeded (or failed).
      Returns:
        True if this is the primary request that will receive the response data.