FeatureMessageFileWriter

abstract class FeatureMessageFileWriter<Path>(val targetPath: Path, sinkOpener: (Path) -> Sink) : FeatureMessageProcessor(source)

A feature message processor responsible for writing feature messages to a file. This abstract class provides functionality to convert and write feature messages into a target file using a specified file system provider.

Parameters

Path

The type representing paths supported by the file system provider.

targetPath

The file where feature messages will be written.

sinkOpener

Returns a Sink for writing to the file, this class manages its lifecycle.

Constructors

Link copied to clipboard
constructor(targetPath: Path, sinkOpener: (Path) -> Sink)

Properties

Link copied to clipboard

Indicates whether the writer is currently open and ready for operation.

Link copied to clipboard

Functions

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

Initializes the feature output stream provider to ensure it is ready for use.

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

Handles an incoming feature message or event for processing.

Link copied to clipboard

Converts the FeatureMessage instance to its corresponding string representation suitable for writing to a file.