Class BufferStreamWriter

java.lang.Object
com.axelor.ai.chat.stream.StreamWriter
com.axelor.ai.chat.stream.BufferStreamWriter
All Implemented Interfaces:
AutoCloseable

public class BufferStreamWriter extends StreamWriter
A StreamWriter that appends serialized SSE frames to an ActiveStream instead of a socket. Never fails on client disconnects — delivery is the subscribers' concern — so the agentic loop always runs to completion.

StreamEvent.Error and StreamEvent.Abort mark the stream terminating first so the error path is exempt from the buffer size cap.

  • Constructor Details

    • BufferStreamWriter

      public BufferStreamWriter(ActiveStream stream, com.fasterxml.jackson.databind.ObjectMapper mapper)
  • Method Details