ClientConnectionConfig

abstract class ClientConnectionConfig(val host: String, port: Int? = null, protocol: URLProtocol? = null, headers: Map<String, List<String>>? = null, val reconnectionDelay: Duration? = null, val requestTimeout: Duration? = null, val connectTimeout: Duration? = null) : ConnectionConfig(source)

Base configuration class for managing client-side connections in a remote communication setup.

This abstract class is designed to provide configuration settings required to establish a client connection, such as protocol, host, port, custom headers, and timeout options. It includes utility properties for constructing URL endpoints corresponding to specific functionalities like Server-Sent Events (SSE), health checks, and message handling.

Subclasses can extend this base configuration to implement more specific connection requirements or initialize predefined settings suitable for particular use cases.

Inheritors

Constructors

Link copied to clipboard
constructor(host: String, port: Int? = null, protocol: URLProtocol? = null, headers: Map<String, List<String>>? = null, reconnectionDelay: Duration? = null, requestTimeout: Duration? = null, connectTimeout: Duration? = null)

Types

Link copied to clipboard
object Companion

Companion object for the ClientConnectionConfig class.

Properties

Link copied to clipboard

The timeout duration for establishing a connection, defaulting to null.

Link copied to clipboard

A collection of headers to be applied to HTTP requests made by the client.

Link copied to clipboard

A computed property that constructs the URL endpoint for health check requests.

Link copied to clipboard

The hostname or IP address of the target server to connect to.

Link copied to clipboard

Provides access to the current JSON serialization and deserialization configuration.

Link copied to clipboard

Constructs the URL endpoint for sending or receiving messages.

Link copied to clipboard
val port: Int

The port number used for establishing a client connection.

Link copied to clipboard

The protocol used for the client connection.

Link copied to clipboard

The delay between attempts to reconnect, if applicable, defaulting to null.

Link copied to clipboard

The timeout duration for requests, defaulting to null.

Link copied to clipboard

Constructs the URL endpoint for Server-Sent Events (SSE) communication.

Link copied to clipboard
val url: String

Provides the base URL for the current connection configuration. Constructs the URL using the protocol, host, and port specified in the connection configuration.

Functions

Link copied to clipboard

Appends the specified serializers module to the existing JSON configuration. This method allows dynamic addition of custom serialization and deserialization logic by merging the provided module with the current serializers module.