Package dev.tachyonmcp.core.server
Interface OutboundStreamResolver
- All Known Implementing Classes:
OutboundSseStreamMessageRouter
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 TypeMethodDescription@Nullable OutboundSseStreamResolves theOutboundSseStreambound in the current dispatch context for the given session, if any.
-
Method Details
-
resolve
Resolves theOutboundSseStreambound in the current dispatch context for the given session, if any. The caller needs the stream before building the event (itsOutboundSseStream.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
nullto fall through to the session's GET-SSE connection
-