Package com.opentok
Class AudioConnectorProperties.Builder
java.lang.Object
com.opentok.AudioConnectorProperties.Builder
- Enclosing class:
- AudioConnectorProperties
Intermediary stateful object used to construct
AudioConnectorProperties
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a header entry to this object's headers property.addHeaders
(Map<String, String> headers) Puts all entries of the map into the headers parameter.Adds an OpenTok stream (with the corresponding stream ID) to include in the WebSocket audio.addStreams
(String... streams) Adds OpenTok streams (with the corresponding stream IDs) to include in the WebSocket audio.addStreams
(Collection<String> streams) Adds OpenTok streams (with the corresponding stream IDs) to include in the WebSocket audio.build()
Builds the AudioConnectorProperties object.
-
Constructor Details
-
Builder
Constructor for the AudioConnectorProperties.Builder, using a URI to define the WebSocket URI.- Parameters:
uri
- The publicly reachable WebSocket URI to be used for the destination of the audio stream.
-
Builder
Constructor for the AudioConnectorProperties.Builder, using a string to define the WebSocket URI.- Parameters:
uri
- The publicly reachable WebSocket URI to be used for the destination of the audio stream, as a string (such as "wss://example.com/ws-endpoint").
-
-
Method Details
-
addStream
Adds an OpenTok stream (with the corresponding stream ID) to include in the WebSocket audio. If the AudioConnectorProperties includes no streams, all streams in the session will be included.- Parameters:
stream
- The stream ID.- Returns:
- This builder with the additional stream ID.
-
addStreams
Adds OpenTok streams (with the corresponding stream IDs) to include in the WebSocket audio. If the AudioConnectorProperties includes no streams, all streams in the session will be included.- Parameters:
streams
- The stream IDs to add.- Returns:
- This builder with the additional stream IDs.
-
addStreams
Adds OpenTok streams (with the corresponding stream IDs) to include in the WebSocket audio. If the AudioConnectorProperties includes no streams, all streams in the session will be included.- Parameters:
streams
- The collection of stream IDs to add.- Returns:
- This builder with the additional stream IDs.
-
addHeaders
Puts all entries of the map into the headers parameter. The headers will be sent to your WebSocket server with each message.- Parameters:
headers
- The map of header key-value pairs to append.- Returns:
- This builder with the specified headers included.
-
addHeader
Adds a header entry to this object's headers property. The header will be sent to your WebSocket server with each message.- Parameters:
key
- Header key.value
- Header value.- Returns:
- This builder with the additional header property.
-
build
Builds the AudioConnectorProperties object.- Returns:
- The constructed
AudioConnectorProperties
object.
-