Package com.brightcove.player.network
Class HttpRequestConfig.Builder
- java.lang.Object
-
- com.brightcove.player.network.HttpRequestConfig.Builder
-
- Enclosing class:
- HttpRequestConfig
public static class HttpRequestConfig.Builder extends java.lang.Object
The HttpRequestConfig Builder.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Instantiates a new HttpRequestConfig.Builder.Builder(HttpRequestConfig httpRequestConfig)
Initializes the instance with the values from an#HttpRequestConfig
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpRequestConfig.Builder
addQueryParameter(java.lang.String queryParameterKey, java.lang.String queryParameterValue)
Adds an HTTP query parameterHttpRequestConfig.Builder
addQueryParameters(java.util.Map<java.lang.String,java.lang.String> queryParameters)
Adds the HTTP request query parameters as a map of key-value pairs.HttpRequestConfig.Builder
addRequestHeader(java.lang.String headerKey, java.lang.String headerValue)
Adds an HTTP request headerHttpRequestConfig.Builder
addRequestHeaders(java.util.Map<java.lang.String,java.lang.String> requestHeaders)
Adds the HTTP request headers as a map of key-value pairs.HttpRequestConfig
build()
Builds the HttpRequestConfig object.HttpRequestConfig.Builder
setBrightcoveAuthorizationToken(java.lang.String brightcoveAuthorizationToken)
Sets the Brightcove authorization token.HttpRequestConfig.Builder
setCustomerRightsTokenConfig(CustomerRightsTokenConfig customerRightsTokenConfig)
-
-
-
Constructor Detail
-
Builder
public Builder()
Instantiates a new HttpRequestConfig.Builder.
-
Builder
public Builder(HttpRequestConfig httpRequestConfig)
Initializes the instance with the values from an#HttpRequestConfig
- Parameters:
httpRequestConfig
- the HttpRequestConfig to initialize the builder.
-
-
Method Detail
-
setBrightcoveAuthorizationToken
public HttpRequestConfig.Builder setBrightcoveAuthorizationToken(@NonNull java.lang.String brightcoveAuthorizationToken)
Sets the Brightcove authorization token. Depending on your VideoCloud account configuration, this token might be required in order to successfully make certain requests.- Parameters:
brightcoveAuthorizationToken
- the Brightcove authorization token- Returns:
- the builder instance
-
setCustomerRightsTokenConfig
public HttpRequestConfig.Builder setCustomerRightsTokenConfig(@NonNull CustomerRightsTokenConfig customerRightsTokenConfig)
-
addRequestHeaders
public HttpRequestConfig.Builder addRequestHeaders(@Nullable java.util.Map<java.lang.String,java.lang.String> requestHeaders)
Adds the HTTP request headers as a map of key-value pairs.- Parameters:
requestHeaders
- the request headers map- Returns:
- the builder instance
-
addRequestHeader
public HttpRequestConfig.Builder addRequestHeader(@NonNull java.lang.String headerKey, @NonNull java.lang.String headerValue)
Adds an HTTP request header- Parameters:
headerKey
- the header keyheaderValue
- the header value- Returns:
- the builder instance
-
addQueryParameters
public HttpRequestConfig.Builder addQueryParameters(@Nullable java.util.Map<java.lang.String,java.lang.String> queryParameters)
Adds the HTTP request query parameters as a map of key-value pairs.- Parameters:
queryParameters
- the query parameters- Returns:
- the builder instance
-
addQueryParameter
public HttpRequestConfig.Builder addQueryParameter(@NonNull java.lang.String queryParameterKey, @NonNull java.lang.String queryParameterValue)
Adds an HTTP query parameter- Parameters:
queryParameterKey
- the query parameter keyqueryParameterValue
- the query parameter value- Returns:
- the builder instance
-
build
public HttpRequestConfig build()
Builds the HttpRequestConfig object.
-
-