Class NetworkConfiguration

java.lang.Object
com.castlabs.android.network.NetworkConfiguration
All Implemented Interfaces:
Parcelable

public class NetworkConfiguration extends Object implements Parcelable
  • Field Details

    • DEFAULT_CONNECT_TIMEOUT_MILLIS

      public static final int DEFAULT_CONNECT_TIMEOUT_MILLIS
      The default connection timeout, in milliseconds.
      See Also:
    • DEFAULT_READ_TIMEOUT_MILLIS

      public static final int DEFAULT_READ_TIMEOUT_MILLIS
      The default read timeout, in milliseconds.
      See Also:
    • DEFAULT_CALL_TIMEOUT_MILLIS

      public static final int DEFAULT_CALL_TIMEOUT_MILLIS
      The default read timeout, in milliseconds.
      See Also:
    • 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:
    • 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:
    • 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:
    • DEFAULT_THUMBNAIL_CONNECT_TIMEOUT_MILLIS

      public static final int DEFAULT_THUMBNAIL_CONNECT_TIMEOUT_MILLIS
      The default thumbnail connection timeout, in milliseconds.
      See Also:
    • DEFAULT_THUMBNAIL_READ_TIMEOUT_MILLIS

      public static final int DEFAULT_THUMBNAIL_READ_TIMEOUT_MILLIS
      The default thumbnail read timeout, in milliseconds.
      See Also:
    • 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
    • thumbnailConnectionTimeoutMs

      public final int thumbnailConnectionTimeoutMs
      The connection timeout in milliseconds for thumbnail requests. This timeout is used only if the ThumbsPlugin is registered.
    • 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
    • thumbnailReadTimeoutMs

      public final int thumbnailReadTimeoutMs
      The read timeout in milliseconds for thumbnail requests. This timeout is used only if the ThumbsPlugin is registered.
    • 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 Details

    • NetworkConfiguration

      public NetworkConfiguration()
  • Method Details

    • 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