Package com.castlabs.android.network

## Class NetworkConfiguration.Builder

- java.lang.Object
- - com.castlabs.android.network.NetworkConfiguration.Builder

- Enclosing class:
    NetworkConfiguration

      public static class NetworkConfiguration.Builder
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Builder()` |
    `Builder​(NetworkConfiguration copy)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `NetworkConfiguration.Builder` | `connectionTimeoutMs​(int value)` | Sets the connection timeout for both manifest and segment requests
    `NetworkConfiguration.Builder` | `dashCallbackConnectionTimeoutMs​(int value)` | Sets the connection timeout for DASH callbacks
    `NetworkConfiguration.Builder` | `dashCallbackReadTimeoutMs​(int value)` | Sets the read timeout for DASH callbacks
    `NetworkConfiguration.Builder` | `drainConnectionTimeoutMs​(int value)` | Sets the drain timeout in milliseconds.
    `NetworkConfiguration.Builder` | `drmAcquisitionTimeoutMs​(int value)` | Sets the acquisition timeout for DRM requests.
    `NetworkConfiguration.Builder` | `drmConnectionTimeoutMs​(int value)` | Sets the connection timeout for DRM requests
    `NetworkConfiguration.Builder` | `drmReadTimeoutMs​(int value)` | Sets the read timeout for DRM requests
    `NetworkConfiguration.Builder` | `drmRetryConfiguration​(RetryConfiguration value)` | Sets the retry configuration used for DRM license requests
    `NetworkConfiguration` | `get()` | Get the network configuration
    `NetworkConfiguration.Builder` | `iptvReadTimeoutMs​(int value)` | Sets the read timeout for DRM requests
    `NetworkConfiguration.Builder` | `manifestConnectionTimeoutMs​(int value)` | Sets the connection timeout for manifest requests
    `NetworkConfiguration.Builder` | `manifestReadTimeoutMs​(int value)` | Sets the read timeout for manifest requests
    `NetworkConfiguration.Builder` | `manifestRetryConfiguration​(RetryConfiguration value)` | Sets the retry configuration used for manifests
    `NetworkConfiguration.Builder` | `provisioningRetryConfiguration​(RetryConfiguration value)` | Sets the retry configuration used for device provisioning
    `NetworkConfiguration.Builder` | `readTimeoutMs​(int value)` | Sets the read timeout for both manifest and segment requests
    `NetworkConfiguration.Builder` | `retryConfiguration​(RetryConfiguration value)` | Sets the retry configuration used for both manifests and segments
    `NetworkConfiguration.Builder` | `segmentsConnectionTimeoutMs​(int value)` | Sets the connection timeout for segment requests
    `NetworkConfiguration.Builder` | `segmentsReadTimeoutMs​(int value)` | Sets the read timeout for segment requests
    `NetworkConfiguration.Builder` | `segmentsRetryConfiguration​(RetryConfiguration value)` | Sets the retry configuration used for segments

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

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

- - ### Constructor Detail

    - #### Builder

          public Builder()

    - #### Builder

          public Builder​(NetworkConfiguration copy)

  - ### Method Detail

    - #### retryConfiguration

          public NetworkConfiguration.Builder retryConfiguration​(@NonNull
                                                                 RetryConfiguration value)

      Sets the retry configuration used for both manifests and segments
      Parameters:
        `value` - Retry configuration
      Returns:
        The builder

    - #### segmentsRetryConfiguration

          public NetworkConfiguration.Builder segmentsRetryConfiguration​(@NonNull
                                                                         RetryConfiguration value)

      Sets the retry configuration used for segments
      Parameters:
        `value` - Retry configuration
      Returns:
        The builder

    - #### drmRetryConfiguration

          public NetworkConfiguration.Builder drmRetryConfiguration​(@NonNull
                                                                    RetryConfiguration value)

      Sets the retry configuration used for DRM license requests
      Parameters:
        `value` - Retry configuration
      Returns:
        The builder

    - #### provisioningRetryConfiguration

          public NetworkConfiguration.Builder provisioningRetryConfiguration​(@NonNull
                                                                             RetryConfiguration value)

      Sets the retry configuration used for device provisioning
      Parameters:
        `value` - Retry configuration
      Returns:
        The builder

    - #### manifestRetryConfiguration

          public NetworkConfiguration.Builder manifestRetryConfiguration​(@NonNull
                                                                         RetryConfiguration value)

      Sets the retry configuration used for manifests
      Parameters:
        `value` - Retry configuration
      Returns:
        The builder

    - #### connectionTimeoutMs

          public NetworkConfiguration.Builder connectionTimeoutMs​(int value)

      Sets the connection timeout for both manifest and segment requests
      Parameters:
        `value` - The new connection timeout
      Returns:
        The builder

    - #### segmentsConnectionTimeoutMs

          public NetworkConfiguration.Builder segmentsConnectionTimeoutMs​(int value)

      Sets the connection timeout for segment requests
      Parameters:
        `value` - The new connection timeout
      Returns:
        The builder

    - #### manifestConnectionTimeoutMs

          public NetworkConfiguration.Builder manifestConnectionTimeoutMs​(int value)

      Sets the connection timeout for manifest requests
      Parameters:
        `value` - The new connection timeout
      Returns:
        The builder

    - #### drmConnectionTimeoutMs

          public NetworkConfiguration.Builder drmConnectionTimeoutMs​(int value)

      Sets the connection timeout for DRM requests
      Parameters:
        `value` - The new connection timeout or `NetworkConfiguration.DEFAULT_DRM_CONNECT_TIMEOUT_MILLIS` to use default
      Returns:
        The builder

    - #### dashCallbackConnectionTimeoutMs

          public NetworkConfiguration.Builder dashCallbackConnectionTimeoutMs​(int value)

      Sets the connection timeout for DASH callbacks
      Parameters:
        `value` - The new connection timeout or `NetworkConfiguration.DEFAULT_CONNECT_TIMEOUT_MILLIS` to use default
      Returns:
        The builder

    - #### readTimeoutMs

          public NetworkConfiguration.Builder readTimeoutMs​(int value)

      Sets the read timeout for both manifest and segment requests
      Parameters:
        `value` - The new connection timeout
      Returns:
        The builder

    - #### segmentsReadTimeoutMs

          public NetworkConfiguration.Builder segmentsReadTimeoutMs​(int value)

      Sets the read timeout for segment requests
      Parameters:
        `value` - The new connection timeout
      Returns:
        The builder

    - #### manifestReadTimeoutMs

          public NetworkConfiguration.Builder manifestReadTimeoutMs​(int value)

      Sets the read timeout for manifest requests
      Parameters:
        `value` - The new connection timeout
      Returns:
        The builder

    - #### drmReadTimeoutMs

          public NetworkConfiguration.Builder drmReadTimeoutMs​(int value)

      Sets the read timeout for DRM requests
      Parameters:
        `value` - The new connection timeout or `NetworkConfiguration.DEFAULT_DRM_READ_TIMEOUT_MILLIS` to use default
      Returns:
        The builder

    - #### iptvReadTimeoutMs

          public NetworkConfiguration.Builder iptvReadTimeoutMs​(int value)

      Sets the read timeout for DRM requests
      Parameters:
        `value` - The new read timeout or `NetworkConfiguration.DEFAULT_READ_TIMEOUT_MILLIS` to use default
      Returns:
        The builder

    - #### dashCallbackReadTimeoutMs

          public NetworkConfiguration.Builder dashCallbackReadTimeoutMs​(int value)

      Sets the read timeout for DASH callbacks
      Parameters:
        `value` - The new connection timeout or `NetworkConfiguration.DEFAULT_READ_TIMEOUT_MILLIS` to use default
      Returns:
        The builder

    - #### drmAcquisitionTimeoutMs

          public NetworkConfiguration.Builder drmAcquisitionTimeoutMs​(int value)

      Sets the acquisition timeout for DRM requests. Maximum total time a single DRM request can take.
      Parameters:
        `value` - The new acquisition timeout or `NetworkConfiguration.DEFAULT_DRM_ACQUISITION_TIMEOUT_MILLIS` to use default
      Returns:
        The builder

    - #### drainConnectionTimeoutMs

          public NetworkConfiguration.Builder drainConnectionTimeoutMs​(int value)

      Sets the drain timeout in milliseconds. This is the time that we give the player to drain and read all remaining data when a connection is closed. If all data can be drained in time, the connection can potentially be re-used.
      Parameters:
        `value` - The new timeout in milliseconds
      Returns:
        The builder

    - #### get

          public NetworkConfiguration get()

      Get the network configuration
      Returns:
        The network configuration