Package dev.tachyonmcp.core.protocol
Interface ProtocolRequestMapper
- All Known Implementing Classes:
McpRequestMapper,McpRequestMapper
public interface ProtocolRequestMapper
Maps protocol-specific request parameters to protocol-neutral domain requests.
Each protocol version (e.g. MCP 2025-11-25) provides its own implementation, mirroring
ProtocolResponseMapper on the response side.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA cancellation notification.static final recordA completion request.static interfaceIdentifies what a completion request is completing against.static final recordAn initialize request.static final recordA page request.static final recordA prompt call request.static final recordA task status update.static final recordA tool call request. -
Method Summary
Modifier and TypeMethodDescriptioncallTool(@Nullable Object params, PayloadDeserializer payloadDeserializer) Mapstools/callparams, deserializing arguments with the givenPayloadDeserializer.cancellation(@Nullable Object params) Mapsnotifications/cancelledparams, ornullif the request cannot be identified.Mapscompletion/completeparams into a completion reference and its request.Mapsprompts/getparams into a prompt name and its argument request.booleanhasMetaKey(@Nullable Object params, String key) Returnstruewhen params carry a_metaentry under the given key.initialize(@Nullable Object params) Mapsinitializeparams into the client's requested extensions.loggingLevel(@Nullable Object params) Extracts the requestedLoggingLevelfromlogging/setLevelparams.@Nullable LoggingLevelpermittedLogLevel(@Nullable Object params) Extracts the client's permittedLoggingLevel, ornullif unset.readResource(@Nullable Object params) Mapsresources/readparams into a resource request.resourceUri(@Nullable Object params) Extracts the resourceurifrom params.Extracts thetaskIdfrom params.@Nullable ProtocolRequestMapper.TaskStatusRequesttaskStatus(@Nullable Object params) Mapstasks/statusnotification params, ornullif unparseable.
-
Method Details
-
page
-
callTool
ProtocolRequestMapper.ToolCallRequest callTool(@Nullable Object params, PayloadDeserializer payloadDeserializer) Mapstools/callparams, deserializing arguments with the givenPayloadDeserializer. -
getPrompt
Mapsprompts/getparams into a prompt name and its argument request. -
readResource
Mapsresources/readparams into a resource request. -
complete
Mapscompletion/completeparams into a completion reference and its request. -
resourceUri
Extracts the resourceurifrom params. -
taskId
Extracts thetaskIdfrom params. -
loggingLevel
Extracts the requestedLoggingLevelfromlogging/setLevelparams. -
initialize
Mapsinitializeparams into the client's requested extensions. -
permittedLogLevel
Extracts the client's permittedLoggingLevel, ornullif unset. -
hasMetaKey
Returnstruewhen params carry a_metaentry under the given key. -
cancellation
Mapsnotifications/cancelledparams, ornullif the request cannot be identified. -
taskStatus
Mapstasks/statusnotification params, ornullif unparseable.
-