Package org.apache.synapse.transport.http.conn

# Interface ReplayDataWriter

public interface ReplayDataWriter
Defines the contract for writing replay data within the HTTP transport layer.

Implementations of this interface handle the persistence of replay records—such as request data into various storage mediums, which may include file systems, in-memory buffers, or other destinations.

This interface acts as an extension point so that custom data writers can be plugged in without altering the core replay dispatching mechanism.

See Also:
  - `for structure details of replay data.`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  Closes this writer and releases any underlying system resources such as file streams or buffers.
  `void`
  `write(ReplayRecord replayRecord)`
  Writes a replay record containing message data and associated metadata.

- ## Method Details

  - ### write

    void write(ReplayRecord replayRecord) throws IOException
    Writes a replay record containing message data and associated metadata. Implementations are responsible for defining how and where the record is persisted.
    Parameters:
      `replayRecord` - the `ReplayRecord` instance to be written
    Throws:
      `IOException` - if any I/O error occurs during the write operation

  - ### close

    void close() throws IOException
    Closes this writer and releases any underlying system resources such as file streams or buffers.

    This method is called during transport shutdown to ensure proper resource cleanup.

    Throws:
      `IOException` - if an error occurs while closing underlying resources