Package com.castlabs.android.network

## Class NetworkConfiguration

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

- All Implemented Interfaces:
    `Parcelable`

      public class NetworkConfiguration
      extends Object
      implements Parcelable

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `NetworkConfiguration.Builder` |

    - ### Nested classes/interfaces inherited from interface android.os.Parcelable

      `Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>`

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static Parcelable.Creator<NetworkConfiguration>` | `CREATOR` | Creator used by the Parcelable implementation
    `int` | `dashCallbackConnectionTimeoutMs` | The connection timeout in milliseconds for DASH callbacks
    `int` | `dashCallbackReadTimeoutMs` | The read timeout in milliseconds for DASH callbacks
    `static int` | `DEFAULT_CALL_TIMEOUT_MILLIS` | The default read timeout, in milliseconds.
    `static int` | `DEFAULT_CONNECT_TIMEOUT_MILLIS` | The default connection timeout, in milliseconds.
    `static int` | `DEFAULT_DRAIN_CONNECTION_TIMEOUT_MS` | The timeout to use while discarding a download of input data.
    `static int` | `DEFAULT_DRM_ACQUISITION_TIMEOUT_MILLIS` | The default DRM acquisition timeout specific to DRM scheme
    `static int` | `DEFAULT_DRM_CONNECT_TIMEOUT_MILLIS` | The default DRM connection timeout specific to DRM scheme
    `static int` | `DEFAULT_DRM_READ_TIMEOUT_MILLIS` | The default DRM read timeout specific to DRM scheme
    `static int` | `DEFAULT_READ_TIMEOUT_MILLIS` | The default read timeout, in milliseconds.
    `int` | `drainConnectionTimeoutMs` | The drain timeout in milliseconds.
    `int` | `drmAcquisitionTimeoutMs` | The acquisition timeout in milliseconds for DRM requests.
    `int` | `drmConnectionTimeoutMs` | The connection timeout in milliseconds for DRM requests
    `int` | `drmReadTimeoutMs` | The read timeout in milliseconds for DRM requests
    `RetryConfiguration` | `drmRetryConfiguration` |
    `int` | `iptvReadTimeoutMs` | The acquisition timeout in milliseconds for IPTV-UDP/RTP requests.
    `int` | `manifestConnectionTimeoutMs` | The connection timeout in milliseconds for manifest requests
    `int` | `manifestReadTimeoutMs` | The read timeout in milliseconds for manifest requests
    `RetryConfiguration` | `manifestRetryConfiguration` | The `RetryConfiguration` for manifest requests that will be to determine how often to retry after loading errors
    `RetryConfiguration` | `provisioningRetryConfiguration` |
    `int` | `segmentsCallTimeoutMs` | Sets the Call timeout for segment requests including the request, redirect and response This only currently works with the OkHttp Plugin.
    `int` | `segmentsConnectionTimeoutMs` | The connection timeout in milliseconds for segment requests
    `int` | `segmentsReadTimeoutMs` | The read timeout in milliseconds for segment requests
    `RetryConfiguration` | `segmentsRetryConfiguration` | The `RetryConfiguration` for segment requests that will be to determine how often to retry after loading errors

    - ### Fields inherited from interface android.os.Parcelable

      `CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `NetworkConfiguration()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `callTimeoutMs​(int requestType)` |
    `int` | `connectionTimeoutMs​(int requestType)` |
    `int` | `describeContents()` |
    `boolean` | `equals​(Object obj)` |
    `int` | `hashCode()` |
    `int` | `readTimeoutMs​(int requestType)` |
    `String` | `toString()` |
    `void` | `writeToParcel​(Parcel dest, int flags)` |

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_CONNECT_TIMEOUT_MILLIS

          public static final int DEFAULT_CONNECT_TIMEOUT_MILLIS

      The default connection timeout, in milliseconds.
      See Also:
        Constant Field Values

    - #### DEFAULT_READ_TIMEOUT_MILLIS

          public static final int DEFAULT_READ_TIMEOUT_MILLIS

      The default read timeout, in milliseconds.
      See Also:
        Constant Field Values

    - #### DEFAULT_CALL_TIMEOUT_MILLIS

          public static final int DEFAULT_CALL_TIMEOUT_MILLIS

      The default read timeout, in milliseconds.
      See Also:
        Constant Field Values

    - #### DEFAULT_DRM_CONNECT_TIMEOUT_MILLIS

          public static final int DEFAULT_DRM_CONNECT_TIMEOUT_MILLIS

      The default DRM connection timeout specific to DRM scheme
      See Also:
        Constant Field Values

    - #### DEFAULT_DRM_READ_TIMEOUT_MILLIS

          public static final int DEFAULT_DRM_READ_TIMEOUT_MILLIS

      The default DRM read timeout specific to DRM scheme
      See Also:
        Constant Field Values

    - #### DEFAULT_DRM_ACQUISITION_TIMEOUT_MILLIS

          public static final int DEFAULT_DRM_ACQUISITION_TIMEOUT_MILLIS

      The default DRM acquisition timeout specific to DRM scheme
      See Also:
        Constant Field Values

    - #### DEFAULT_DRAIN_CONNECTION_TIMEOUT_MS

          public static int DEFAULT_DRAIN_CONNECTION_TIMEOUT_MS

      The timeout to use while discarding a download of input data. This is the time that we allow the connection to drain and finish before the download is aborted. If the download can be drained in time, it increases the chance that the connection can be reused. This timeout should be significantly less than the time it takes to establish a new connection.

    - #### CREATOR

          public static final Parcelable.Creator<NetworkConfiguration> CREATOR

      Creator used by the Parcelable implementation

    - #### manifestConnectionTimeoutMs

          public final int manifestConnectionTimeoutMs

      The connection timeout in milliseconds for manifest requests

    - #### segmentsConnectionTimeoutMs

          public final int segmentsConnectionTimeoutMs

      The connection timeout in milliseconds for segment requests

    - #### drmConnectionTimeoutMs

          public final int drmConnectionTimeoutMs

      The connection timeout in milliseconds for DRM requests

    - #### dashCallbackConnectionTimeoutMs

          public final int dashCallbackConnectionTimeoutMs

      The connection timeout in milliseconds for DASH callbacks

    - #### manifestReadTimeoutMs

          public final int manifestReadTimeoutMs

      The read timeout in milliseconds for manifest requests

    - #### segmentsReadTimeoutMs

          public final int segmentsReadTimeoutMs

      The read timeout in milliseconds for segment requests

    - #### drmReadTimeoutMs

          public final int drmReadTimeoutMs

      The read timeout in milliseconds for DRM requests

    - #### dashCallbackReadTimeoutMs

          public final int dashCallbackReadTimeoutMs

      The read timeout in milliseconds for DASH callbacks

    - #### drmAcquisitionTimeoutMs

          public final int drmAcquisitionTimeoutMs

      The acquisition timeout in milliseconds for DRM requests. Maximum total time a single DRM request can take.

    - #### drainConnectionTimeoutMs

          public final int drainConnectionTimeoutMs

      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.

    - #### iptvReadTimeoutMs

          public final int iptvReadTimeoutMs

      The acquisition timeout in milliseconds for IPTV-UDP/RTP requests. Maximum total time a single IPTV Read request can take.

    - #### segmentsCallTimeoutMs

          public final int segmentsCallTimeoutMs

      Sets the Call timeout for segment requests including the request, redirect and response This only currently works with the OkHttp Plugin.

    - #### manifestRetryConfiguration

          @NonNull
          public final RetryConfiguration manifestRetryConfiguration

      The `RetryConfiguration` for manifest requests that will be to determine how often to retry after loading errors

    - #### segmentsRetryConfiguration

          @NonNull
          public final RetryConfiguration segmentsRetryConfiguration

      The `RetryConfiguration` for segment requests that will be to determine how often to retry after loading errors

    - #### drmRetryConfiguration

          @NonNull
          public final RetryConfiguration drmRetryConfiguration

    - #### provisioningRetryConfiguration

          @NonNull
          public final RetryConfiguration provisioningRetryConfiguration

  - ### Constructor Detail

    - #### NetworkConfiguration

          public NetworkConfiguration()

  - ### Method Detail

    - #### readTimeoutMs

          public int readTimeoutMs​(int requestType)

      Parameters:
        `requestType` - The request type
      Returns:
        The read timeout for the given request type

    - #### callTimeoutMs

          public int callTimeoutMs​(int requestType)

      Parameters:
        `requestType` - The request type
      Returns:
        The Call timeout for the given request type

    - #### connectionTimeoutMs

          public int connectionTimeoutMs​(int requestType)

      Parameters:
        `requestType` - The request type
      Returns:
        The connection timeout for the given request type

    - #### describeContents

          public int describeContents()

      Specified by:
        `describeContents` in interface `Parcelable`

    - #### writeToParcel

          public void writeToParcel​(Parcel dest,
                                    int flags)

      Specified by:
        `writeToParcel` in interface `Parcelable`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals​(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`