Interface McpDispatchResult

All Known Implementing Classes:
McpResponseResult, McpStreamResult

public sealed interface McpDispatchResult permits McpResponseResult, McpStreamResult
The non-notification result of one McpRevision.dispatch(McpExchange, McpServerConfig, org.apache.juneau.commons.inject.BeanStore) call: either a complete JSON-RPC response envelope (McpResponseResult) or a held-open streaming publisher (McpStreamResult, for a revision-specific method whose successful result is not a single JSON-RPC envelope, e.g. the 2026-07-28 subscriptions/listen method).

dispatch(...) may still return plain null (neither variant) for a notification request, which the HTTP layer renders as an empty body — see McpRevision.dispatch(org.apache.juneau.rest.server.mcp.McpExchange, org.apache.juneau.rest.server.mcp.McpServerConfig, org.apache.juneau.commons.inject.BeanStore).

Introduced so callers switch/instanceof-pattern-match over a closed, compiler-checked set of outcomes instead of casting the historical Object-typed return value.

Since:
10.0.0