HttpConnectivityOptions

class HttpConnectivityOptions(val options: ConnectivityOptions = ConnectivityOptions(), val urls: List<String> = DEFAULT_URLS, val port: Int = DEFAULT_PORT, val method: HttpMethod = DEFAULT_HTTP_METHOD, val timeoutMs: Long = DEFAULT_TIMEOUT, val pollingIntervalMs: Long = DEFAULT_POLLING_INTERVAL_MS, val onPollResult: (result: PollResult) -> Unit? = null)

The HttpConnectivityOptions class is used to configure the HTTP connectivity monitoring.

Constructors

Link copied to clipboard
constructor(options: ConnectivityOptions = ConnectivityOptions(), urls: List<String> = DEFAULT_URLS, port: Int = DEFAULT_PORT, method: HttpMethod = DEFAULT_HTTP_METHOD, timeoutMs: Long = DEFAULT_TIMEOUT, pollingIntervalMs: Long = DEFAULT_POLLING_INTERVAL_MS, onPollResult: (result: PollResult) -> Unit? = null)

Types

Link copied to clipboard
class Builder

The Builder class is used to build a new HttpConnectivityOptions instance using a builder pattern.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val method: HttpMethod

The HttpMethod to use for the HTTP requests.

Link copied to clipboard
val onPollResult: (result: PollResult) -> Unit? = null

The lambda function to call when a poll is made.

Link copied to clipboard

The ConnectivityOptions used to configure the connectivity monitoring. Defaults to a new ConnectivityOptions instance.

Link copied to clipboard

The interval between each poll in milliseconds.

Link copied to clipboard
val port: Int

The port to use for the HTTP requests.

Link copied to clipboard

The timeout for the HTTP requests in milliseconds.

Link copied to clipboard

The list of urls to use when checking for connection.