FeatureMessageRemoteClient

class FeatureMessageRemoteClient(val connectionConfig: ClientConnectionConfig, scope: CoroutineScope, baseClient: HttpClient = HttpClient(engineFactoryProvider()), requestBuilder: HttpRequestBuilder.() -> Unit = {}) : FeatureMessageClient(source)

A remote client implementation for handling feature messages via HTTP and Server-Sent Events (SSE).

Note: Please make sure you call connect before starting a communication process. If the server is not available, the method will throw the IllegalStateException exception.

Constructors

Link copied to clipboard
constructor(connectionConfig: ClientConnectionConfig, scope: CoroutineScope, baseClient: HttpClient = HttpClient(engineFactoryProvider()), requestBuilder: HttpRequestBuilder.() -> Unit = {})

Properties

Link copied to clipboard

The configuration for connecting to the remote server, including server URL and JSON settings.

Link copied to clipboard
open override val isConnected: Boolean

Indicates whether the client is currently connected to the remote feature messaging service.

Link copied to clipboard

A communication channel for receiving feature messages or events.

Functions

Link copied to clipboard
open suspend override fun close()
Link copied to clipboard
open suspend override fun connect()

Establishes a connection to the remote feature messaging service.

Link copied to clipboard
open suspend override fun healthCheck()

Performs a health check to verify the status of the remote feature messaging service.

Link copied to clipboard
open suspend override fun send(message: FeatureMessage)

Sends a feature-related message to the remote feature messaging service.