FeatureMessageRemoteServer

A server for managing remote feature message communication via server-sent events (SSE) and HTTP endpoints.

Supported features:

  • Server-sent events (SSE) for messages from a server side;

  • Provides health check and message handling endpoints via HTTP;

  • Process messages from clients via /message POST request.

Note: Please make sure you call the start method before starting a communication process.

Constructors

Link copied to clipboard
constructor(connectionConfig: ServerConnectionConfig)

Properties

Link copied to clipboard
open override val isStarted: Boolean

Indicates whether the server has been started.

Link copied to clipboard

Functions

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

Sends a feature message for further processing or delivery to connected clients via server-sent events (SSE).

Link copied to clipboard
open suspend override fun start()

Starts the server, initializing any necessary resources and beginning to listen for incoming client connections or events.

Link copied to clipboard

Serializes the current FeatureMessage instance into a JSON string format.