public interface StreamLinkConfiguration
Interface that allows the configuration of StreamLink to be defined programmatically.
You can obtain an instance of this interface by calling com.caplin.streamlink.StreamLinkFactory.createConfiguration()
.
Modifier and Type | Method and Description |
---|---|
StreamLinkConfiguration |
addLiberatorUrlGroup(java.lang.String... urls)
Adds a group of URLs that define possible Liberator connections.
|
StreamLinkConfiguration |
setApplicationId(java.lang.String applicationId)
Sets the application identifier.
|
StreamLinkConfiguration |
setClockOffsetInterval(int milliseconds)
Sets the interval between successive calculations of clock offset value(default 10000 milliseconds).
|
StreamLinkConfiguration |
setClockOffsetWindow(int milliseconds)
Sets the time a calculated clock offset is valid for use in producing statistics (default 120000 milliseconds).
|
StreamLinkConfiguration |
setDisablePolling(java.lang.Boolean disablePolling)
Set to true if you don't want to use polling connection when the rttp(s) protocol is specified.
|
StreamLinkConfiguration |
setDisableSseConnection(java.lang.Boolean disableSseConnection)
Set to true if you don't want to use server side events connection when the rttp(s) protocol is specified.
|
StreamLinkConfiguration |
setForeverFrameReconnectCount(int count)
Not used in this version of StreamLink.
|
StreamLinkConfiguration |
setHttpPadLength(int httpPadLength)
Sets the http pad length to be used for http and Forever Frame connections.
|
StreamLinkConfiguration |
setHttpTimeout(int timeout)
Sets the time allowed for an HTTP Request to finish successfully before StreamLink times out (default 3000 milliseconds).
|
StreamLinkConfiguration |
setInactivityTimeout(int milliseconds)
Maximum time in milliseconds that Liberator waits to receive messages from this
StreamLink client.
|
StreamLinkConfiguration |
setKeymasterPollInterval(int interval)
Interval in milliseconds at which StreamLink will poll KeyMaster (on the KeyMaster poll URL) to keep the KeyMaster session open.
|
StreamLinkConfiguration |
setKeymasterPollResponseListener(KeymasterPollResponseListener keymasterPollListener)
Sets a
KeymasterPollResponseListener to receive information about responses
to keep-alive requests made to KeyMaster. |
StreamLinkConfiguration |
setKeymasterPollUrl(java.lang.String url)
Sets the URL that StreamLink uses to check the connection to KeyMaster every KeyMaster poll interval milliseconds.
|
StreamLinkConfiguration |
setKeymasterUrl(java.lang.String url)
Sets the URL of KeyMaster for secure authentication of Liberator login requests./p>
|
StreamLinkConfiguration |
setLatencyInterval(int milliseconds)
Sets the time between successive calculations of average latency (default 10000 milliseconds).
|
StreamLinkConfiguration |
setLatencyWindow(int milliseconds)
Sets the time for which a calculated latency value is valid for use in producing statistics (default 120000 milliseconds).
|
StreamLinkConfiguration |
setLogBufferSize(int size)
Sets the size of the log buffer to be used in Streamlink.
|
StreamLinkConfiguration |
setLogWindowLogLevel(LogLevel level)
Not used in this version of StreamLink.
|
StreamLinkConfiguration |
setLogWindowVisible(boolean show)
Not used in this version of StreamLink.
|
StreamLinkConfiguration |
setPassword(java.lang.String password)
Sets the Liberator login password to use if logins are not being managed by KeyMaster or a custom
CredentialsProvider . |
StreamLinkConfiguration |
setPollInterval(int milliseconds)
Sets the time interval in milliseconds between polls of the Liberator.
|
StreamLinkConfiguration |
setProxy(java.net.Proxy proxy)
Sets the proxy to be used for http(s) and poll(s) connection protocols.
|
StreamLinkConfiguration |
setReconnectDelay(int milliseconds)
Delay in milliseconds before retrying, after failing to connect with all available connection options (default 2000 milliseconds).
|
StreamLinkConfiguration |
setRequestTimeout(int milliseconds)
Time in milliseconds allowed for the response to each command before StreamLink reconnects to the Liberator.
|
StreamLinkConfiguration |
setUsername(java.lang.String username)
Sets the Liberator login user-name to use if logins are not being managed by KeyMaster or a custom
CredentialsProvider . |
StreamLinkConfiguration setApplicationId(java.lang.String applicationId)
Sets the application identifier.
applicationId
- The application identifier.StreamLinkConfiguration
instance.StreamLinkConfiguration addLiberatorUrlGroup(java.lang.String... urls)
Adds a group of URLs that define possible Liberator connections.
urls
- A set of URLs defining a Liberator connection group.StreamLinkConfiguration
instance.
For more information on defining Liberator URL groups see StreamLinkFactory
and the "Resilience, failover, and load balancing" section of the StreamLink Overview.
StreamLinkConfiguration setUsername(java.lang.String username)
Sets the Liberator login user-name to use if logins are not being managed by KeyMaster or a custom CredentialsProvider
.
username
- The Liberator login user-name.StreamLinkConfiguration
instance.StreamLinkConfiguration setPassword(java.lang.String password)
Sets the Liberator login password to use if logins are not being managed by KeyMaster or a custom CredentialsProvider
.
password
- The Liberator login password.StreamLinkConfiguration
instance.StreamLinkConfiguration setPollInterval(int milliseconds)
Sets the time interval in milliseconds between polls of the Liberator.
milliseconds
- The poll interval.StreamLinkConfiguration
instance.
This only applies to HTTP polling type connections (see 'RTTP connection types' in the document StreamLink Overview).
StreamLinkConfiguration setForeverFrameReconnectCount(int count)
Not used in this version of StreamLink.
StreamLinkConfiguration setDisablePolling(java.lang.Boolean disablePolling)
Set to true if you don't want to use polling connection when the rttp(s) protocol is specified.
disablePolling
- Set to true to disable polling connection in rttp(s) protocol.StreamLinkConfiguration
instance.StreamLinkConfiguration setDisableSseConnection(java.lang.Boolean disableSseConnection)
Set to true if you don't want to use server side events connection when the rttp(s) protocol is specified.
disablePolling
- Set to true to disable server side events connection in rttp(s) protocol.StreamLinkConfiguration
instance.StreamLinkConfiguration setRequestTimeout(int milliseconds)
Time in milliseconds allowed for the response to each command before StreamLink reconnects to the Liberator.
milliseconds
- The request timeout period in milliseconds.StreamLinkConfiguration
instance.StreamLinkConfiguration setReconnectDelay(int milliseconds)
Delay in milliseconds before retrying, after failing to connect with all available connection options (default 2000 milliseconds).
milliseconds
- The request timeout period in milliseconds.StreamLinkConfiguration
instance.StreamLinkConfiguration setClockOffsetInterval(int milliseconds)
Sets the interval between successive calculations of clock offset value(default 10000 milliseconds).
For more information, see the clock_offset_interval
JSON attribute in caplin.streamlink.StreamLinkFactory
.
milliseconds
- The clock offset interval in milliseconds.StreamLinkConfiguration
instance.StreamLinkConfiguration setClockOffsetWindow(int milliseconds)
Sets the time a calculated clock offset is valid for use in producing statistics (default 120000 milliseconds).
For more information, see the clock_offset_window
JSON attribute in caplin.streamlink.StreamLinkFactory
.
milliseconds
- The clock offset window in milliseconds.StreamLinkConfiguration
instance.StreamLinkConfiguration setLatencyInterval(int milliseconds)
Sets the time between successive calculations of average latency (default 10000 milliseconds).
For more information, see the latency_interval
JSON attribute in caplin.streamlink.StreamLinkFactory
.
milliseconds
- The latency interval in milliseconds.StreamLinkConfiguration
instance.StreamLinkConfiguration setLatencyWindow(int milliseconds)
Sets the time for which a calculated latency value is valid for use in producing statistics (default 120000 milliseconds).
For more information, see the latency_window
JSON attribute in caplin.streamlink.StreamLinkFactory
.
milliseconds
- The latency window in milliseconds.StreamLinkConfiguration
instance.StreamLinkConfiguration setHttpTimeout(int timeout)
Sets the time allowed for an HTTP Request to finish successfully before StreamLink times out (default 3000 milliseconds).
timeout
- The timeout period in milliseconds.StreamLinkConfiguration
instance.StreamLinkConfiguration setInactivityTimeout(int milliseconds)
Maximum time in milliseconds that Liberator waits to receive messages from this StreamLink client.
If the Liberator fails to receive a message from StreamLink within this interval, it disconnects the session and waits for a reconnection attempt.
The clock offset between Liberator and StreamLink is determined periodically by StreamLink
sending a message to the Liberator.
It is therefore recommended that this option should be configured to be greater than the ClockOffset
configuration value. If it is configured to be smaller, more reconnections than required will
take place.
Note: This feature is only supported by Liberator 6.0 and newer. To determine if your Liberator installation supports this feature, refer to the Liberator's release note.
milliseconds
- The inactivity period in milliseconds.StreamLinkConfiguration
instance.StreamLinkConfiguration setKeymasterPollResponseListener(KeymasterPollResponseListener keymasterPollListener)
Sets a KeymasterPollResponseListener
to receive information about responses
to keep-alive requests made to KeyMaster.
keymasterPollListener
- The implementation of KeymasterPollResponseListener
.StreamLinkConfiguration
instance.StreamLinkConfiguration setKeymasterPollUrl(java.lang.String url)
Sets the URL that StreamLink uses to check the connection to KeyMaster every KeyMaster poll interval milliseconds.
url
- The URL that StreamLink uses to check the connection.StreamLinkConfiguration
instance.StreamLinkConfiguration setKeymasterPollInterval(int interval)
Interval in milliseconds at which StreamLink will poll KeyMaster (on the KeyMaster poll URL) to keep the KeyMaster session open.
interval
- The interval in at which StreamLink will poll KeyMaster (default 600000 milliseconds).StreamLinkConfiguration
instance.StreamLinkConfiguration setKeymasterUrl(java.lang.String url)
Sets the URL of KeyMaster for secure authentication of Liberator login requests./p>
url
- The KeyMaster URLStreamLinkConfiguration
instance.StreamLinkConfiguration setLogWindowLogLevel(LogLevel level)
Not used in this version of StreamLink.
StreamLinkConfiguration setLogWindowVisible(boolean show)
Not used in this version of StreamLink.
StreamLinkConfiguration setProxy(java.net.Proxy proxy)
Sets the proxy to be used for http(s) and poll(s) connection protocols.
proxy
- The proxy to be used.StreamLinkConfiguration
instance.StreamLinkConfiguration setLogBufferSize(int size)
Sets the size of the log buffer to be used in Streamlink. If the size is less than or equal to 0, the log buffer will be disabled. (default -1).
size
- The size of the log buffer to be usedStreamLinkConfiguration
instance.StreamLinkConfiguration setHttpPadLength(int httpPadLength)
Sets the http pad length to be used for http and Forever Frame connections.
proxy
- The pad length to be used.StreamLinkConfiguration
instance.Please send bug reports and comments to Caplin support