Interface McpRevision
- All Known Implementing Classes:
McpRevision,McpRevision
A consumer binds exactly one revision at compile time, by extending that revision's abstract
servlet or composing its endpoint mixin. There is deliberately no ServiceLoader wiring
and no priority()/isAvailable() pair: unlike the transport-provider precedent in
juneau-rest-client-apache-httpclient-45, there is never a set of runtime candidates to
choose between.
This interface has exactly three methods and must stay that way. default methods
here are reserved for genuinely additive future protocol growth — a hook a later revision needs
that earlier revisions can no-op. They are not for utility plumbing: a revision-neutral
helper belongs on whichever neutral type already owns the concept (an envelope bean,
McpCursor, McpParamUtils), never here.
-
Method Summary
Modifier and TypeMethodDescriptiondispatch(McpExchange exchange, McpServerConfig config, BeanStore ctx) Dispatches one JSON-RPC request.interrorCode(McpErrorKind kind) Maps a neutral failure classification to this revision's JSON-RPC error code.The MCP protocol revision string this implementation speaks.
-
Method Details
-
protocolVersion
The MCP protocol revision string this implementation speaks.- Returns:
- The revision token (e.g.
"2025-06-18"). Nevernull .
-
dispatch
Dispatches one JSON-RPC request.- Parameters:
exchange- The inbound envelope plus header access. Nevernull .config- The neutral handler registry and pagination strategy. Nevernull .ctx- The per-request bean store, passed through to handlers. Nevernull .- Returns:
- A
McpResponseResultfor a normal request, aMcpStreamResult(for example wrapping aFlow.Publisherproduced by a v2-only method) for a request whose response is not a single JSON-RPC envelope, ornull for a notification request (which the HTTP layer renders as an empty body).
-
errorCode
Maps a neutral failure classification to this revision's JSON-RPC error code.- Parameters:
kind- The failure classification. Nevernull .- Returns:
- The JSON-RPC error code this revision reports for that kind.
-