Package com.opentok
Class OpenTok.Builder
java.lang.Object
com.opentok.OpenTok.Builder
- Enclosing class:
- OpenTok
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 -
Method Summary
Modifier and TypeMethodDescriptionDo not use.appendToUserAgent
(String appendUserAgent) Append a custom string to the client's User-Agent.build()
Builds the OpenTok object with the settings provided to this Builder object.Sets a proxy server that the HTTP client will use when making calls to the OpenTok REST API.proxy
(Proxy proxy, com.opentok.util.HttpClient.ProxyAuthScheme proxyAuthScheme, String principal, String password) requestTimeout
(int requestTimeout) Specify the timeout for HTTP requests (in seconds).
-
Constructor Details
-
Builder
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.
-
Builder
-
-
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(Proxy proxy, com.opentok.util.HttpClient.ProxyAuthScheme proxyAuthScheme, String principal, String password) -
appendToUserAgent
Append a custom string to the client's User-Agent. This is to enable tracking for custom integrations.- Parameters:
appendUserAgent
- The string to append to the user agent.- Returns:
- This Builder with the additional user agent string.
-
build
Builds the OpenTok object with the settings provided to this Builder object.- Returns:
- The OpenTok object.
-