Interface OutboundStreamResolver

All Known Implementing Classes:
OutboundSseStreamMessageRouter

@InternalApi public interface OutboundStreamResolver
Resolves the transport channel server-to-client SSE events should be delivered on.

When a request handler is mid-dispatch, an active OutboundSseStream can be bound in the dispatch context; the resolver opportunistically diverts events for the dispatched session to that stream (lazy SSE upgrade of the transport response). Events for any other session continue through the standard GET-SSE pipeline (hot buffer + flush).

This abstraction keeps TachyonServer / McpDispatcher free of transport-aware branching.

  • Method Summary

    Modifier and Type
    Method
    Description
    resolve(Session session)
    Resolves the OutboundSseStream bound in the current dispatch context for the given session, if any.
  • Method Details

    • resolve

      @Nullable OutboundSseStream resolve(Session session)
      Resolves the OutboundSseStream bound in the current dispatch context for the given session, if any. The caller needs the stream before building the event (its OutboundSseStream.streamKey() goes into the SSE event id and the event log), so resolution and delivery are separate steps.
      Parameters:
      session - the target session for the event
      Returns:
      the bound stream to deliver on, or null to fall through to the session's GET-SSE connection