Package com.opentok
Class OpenTok.Builder
java.lang.Object
com.opentok.OpenTok.Builder
- Enclosing class:
- OpenTok
public static class OpenTok.Builder
extends java.lang.Object
Used to create an OpenTok object with advanced settings. You can set
the request timeout for API calls and a proxy to use for API calls.
If you do not need to set these advanced settings, you can use the
OpenTok()
constructor to build the OpenTok object.
-
Constructor Summary
Constructors Constructor Description Builder(int apiKey, java.lang.String apiSecret)
Constructs a new OpenTok.Builder object. -
Method Summary
Modifier and Type Method Description OpenTok.Builder
apiUrl(java.lang.String apiUrl)
Do not use.OpenTok
build()
Builds the OpenTok object with the settings provided to this Builder object.OpenTok.Builder
proxy(java.net.Proxy proxy)
Sets a proxy server that the HTTP client will use when making calls to the OpenTok REST API.OpenTok.Builder
proxy(java.net.Proxy proxy, com.opentok.util.HttpClient.ProxyAuthScheme proxyAuthScheme, java.lang.String principal, java.lang.String password)
OpenTok.Builder
requestTimeout(int requestTimeout)
Specify the timeout for HTTP requests (in seconds).
-
Constructor Details
-
Builder
public Builder(int apiKey, java.lang.String apiSecret)Constructs a new OpenTok.Builder object.- Parameters:
apiKey
- The API key for your OpenTok project.apiSecret
- The API secret for your OpenTok project. You can obtain your API key and secret from your Video API account. Do not publicly share your API secret.
-
-
Method Details
-
apiUrl
Do not use. This method is used by Vonage for testing. -
proxy
Sets a proxy server that the HTTP client will use when making calls to the OpenTok REST API. -
requestTimeout
Specify the timeout for HTTP requests (in seconds). The default timeout is 60 seconds. -
proxy
public OpenTok.Builder proxy(java.net.Proxy proxy, com.opentok.util.HttpClient.ProxyAuthScheme proxyAuthScheme, java.lang.String principal, java.lang.String password) -
build
Builds the OpenTok object with the settings provided to this Builder object.- Returns:
- The OpenTok object.
-