Class ElicitationRequests
McpInputRequiredSignal from one or more typed ElicitRequests (MCP
2026-07-28 SEP-2322 elicitation, riding the Multi-Round-Trip Requests loop).
McpInputRequiredSignal's constructor takes Map<String,Object> whose values must be Map
at runtime (see its own Javadoc); this helper serializes each ElicitRequest to that shape via Juneau's
JSON marshaller (round-tripped through JsonMap, the same technique
McpMrtrResumeContext.continuationAs(Class) already demonstrates for the continuation side) so a
handler never hand-builds the raw map itself. Pure marshalling: no dispatcher-visible state, no new capability
gate — the existing elicitation-specific gate in McpRevision#pause already covers every signal this
helper produces.
-
Method Summary
Modifier and TypeMethodDescriptionstatic McpInputRequiredSignalof(String id, ElicitRequest request, Object continuation) Builds a single-questionMcpInputRequiredSignal.static McpInputRequiredSignalof(Map<String, ElicitRequest> requests, Object continuation) Builds a multi-questionMcpInputRequiredSignal(MRTR's multi-request-per-round case: several elicitations paused on together, resumed together).
-
Method Details
-
of
Builds a single-questionMcpInputRequiredSignal.- Parameters:
id- The server-assigned id for this question. Must not benull .request- The typed elicitation request. Must not benull .continuation- Handler-opaque continuation value. Can benull if the handler needs no state carried between rounds.- Returns:
- A new signal ready to be thrown.
- Throws:
IllegalArgumentException- Ifidorrequestisnull .
-
of
Builds a multi-questionMcpInputRequiredSignal(MRTR's multi-request-per-round case: several elicitations paused on together, resumed together).Unlike
ElicitationResponses.toInputResponses(Map)(client side), an emptyrequestsmap is rejected, not accepted — deliberately asymmetric, since a signal built with zero questions would be a pointless pause, whereas a caller resuming may legitimately have zero elicitation answers on hand if the round it is resuming only carried non-elicitation MRTR pauses.- Parameters:
requests- Server-assigned-id-keyed typed elicitation requests. Must not benull or empty, and no value may benull . Output iteration order mirrors this map's order, so a caller wanting deterministic ordering should pass aLinkedHashMap.continuation- Handler-opaque continuation value. Can benull .- Returns:
- A new signal ready to be thrown.
- Throws:
IllegalArgumentException- Ifrequestsisnull or empty, or any value in it isnull .
-