Package com.castlabs.android.network
Class NetworkConfiguration.Builder
java.lang.Object
com.castlabs.android.network.NetworkConfiguration.Builder
- Enclosing class:
NetworkConfiguration
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconnectionTimeoutMs
(int value) Sets the connection timeout for both manifest and segment requestsdashCallbackConnectionTimeoutMs
(int value) Sets the connection timeout for DASH callbacksdashCallbackReadTimeoutMs
(int value) Sets the read timeout for DASH callbacksdrainConnectionTimeoutMs
(int value) Sets the drain timeout in milliseconds.drmAcquisitionTimeoutMs
(int value) Sets the acquisition timeout for DRM requests.drmConnectionTimeoutMs
(int value) Sets the connection timeout for DRM requestsdrmReadTimeoutMs
(int value) Sets the read timeout for DRM requestsSets the retry configuration used for DRM license requestsget()
Get the network configurationiptvReadTimeoutMs
(int value) Sets the read timeout for DRM requestsmanifestConnectionTimeoutMs
(int value) Sets the connection timeout for manifest requestsmanifestReadTimeoutMs
(int value) Sets the read timeout for manifest requestsSets the retry configuration used for manifestsSets the retry configuration used for device provisioningreadTimeoutMs
(int value) Sets the read timeout for both manifest and segment requestsSets the retry configuration used for both manifests and segmentssegmentsCallTimeoutMs
(int value) Sets the Call timeout for segment requests including the request, redirect and response This only currently works with the OkHttp Plugin.segmentsConnectionTimeoutMs
(int value) Sets the connection timeout for segment requestssegmentsReadTimeoutMs
(int value) Sets the read timeout for segment requestsSets the retry configuration used for segmentsthumbnailConnectionTimeoutMs
(int value) Sets the connection timeout for thumbnail requests.thumbnailReadTimeoutMs
(int value) Sets the read timeout for thumbnail requests.
-
Constructor Details
-
Builder
public Builder() -
Builder
-
-
Method Details
-
retryConfiguration
Sets the retry configuration used for both manifests and segments- Parameters:
value
- Retry configuration- Returns:
- The builder
-
segmentsRetryConfiguration
Sets the retry configuration used for segments- Parameters:
value
- Retry configuration- Returns:
- The builder
-
drmRetryConfiguration
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
Sets the retry configuration used for manifests- Parameters:
value
- Retry configuration- Returns:
- The builder
-
connectionTimeoutMs
Sets the connection timeout for both manifest and segment requests- Parameters:
value
- The new connection timeout- Returns:
- The builder
-
segmentsConnectionTimeoutMs
Sets the connection timeout for segment requests- Parameters:
value
- The new connection timeout- Returns:
- The builder
-
manifestConnectionTimeoutMs
Sets the connection timeout for manifest requests- Parameters:
value
- The new connection timeout- Returns:
- The builder
-
drmConnectionTimeoutMs
Sets the connection timeout for DRM requests- Parameters:
value
- The new connection timeout orNetworkConfiguration.DEFAULT_DRM_CONNECT_TIMEOUT_MILLIS
to use default- Returns:
- The builder
-
dashCallbackConnectionTimeoutMs
Sets the connection timeout for DASH callbacks- Parameters:
value
- The new connection timeout orNetworkConfiguration.DEFAULT_CONNECT_TIMEOUT_MILLIS
to use default- Returns:
- The builder
-
thumbnailConnectionTimeoutMs
Sets the connection timeout for thumbnail requests. This timeout is used only if the ThumbsPlugin is registered.- Parameters:
value
- The new connection timeout- Returns:
- The builder
-
readTimeoutMs
Sets the read timeout for both manifest and segment requests- Parameters:
value
- The new connection timeout- Returns:
- The builder
-
segmentsReadTimeoutMs
Sets the read timeout for segment requests- Parameters:
value
- The new connection timeout- Returns:
- The builder
-
segmentsCallTimeoutMs
Sets the Call timeout for segment requests including the request, redirect and response This only currently works with the OkHttp Plugin. TODO: Add support in the Default Http Plugin.- Parameters:
value
- The new segment call timeout.- Returns:
- The builder
-
manifestReadTimeoutMs
Sets the read timeout for manifest requests- Parameters:
value
- The new connection timeout- Returns:
- The builder
-
drmReadTimeoutMs
Sets the read timeout for DRM requests- Parameters:
value
- The new connection timeout orNetworkConfiguration.DEFAULT_DRM_READ_TIMEOUT_MILLIS
to use default- Returns:
- The builder
-
iptvReadTimeoutMs
Sets the read timeout for DRM requests- Parameters:
value
- The new read timeout orNetworkConfiguration.DEFAULT_READ_TIMEOUT_MILLIS
to use default- Returns:
- The builder
-
dashCallbackReadTimeoutMs
Sets the read timeout for DASH callbacks- Parameters:
value
- The new connection timeout orNetworkConfiguration.DEFAULT_READ_TIMEOUT_MILLIS
to use default- Returns:
- The builder
-
thumbnailReadTimeoutMs
Sets the read timeout for thumbnail requests. This timeout is used only if the ThumbsPlugin is registered.- Parameters:
value
- The new connection timeout- Returns:
- The builder
-
drmAcquisitionTimeoutMs
Sets the acquisition timeout for DRM requests. Maximum total time a single DRM request can take.- Parameters:
value
- The new acquisition timeout orNetworkConfiguration.DEFAULT_DRM_ACQUISITION_TIMEOUT_MILLIS
to use default- Returns:
- The builder
-
drainConnectionTimeoutMs
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
Get the network configuration- Returns:
- The network configuration
-