public static class McpStatelessServerFeatures.Async extends Object
| Constructor and Description |
|---|
Async(McpSchema.Implementation serverInfo,
McpSchema.ServerCapabilities serverCapabilities,
List<McpStatelessServerFeatures.AsyncToolSpecification> tools,
Map<String,McpStatelessServerFeatures.AsyncResourceSpecification> resources,
List<McpSchema.ResourceTemplate> resourceTemplates,
Map<String,McpStatelessServerFeatures.AsyncPromptSpecification> prompts,
Map<McpSchema.CompleteReference,McpStatelessServerFeatures.AsyncCompletionSpecification> completions,
String instructions)
Create an instance and validate the arguments.
|
| Modifier and Type | Method and Description |
|---|---|
static McpStatelessServerFeatures.Async |
fromSync(McpStatelessServerFeatures.Sync syncSpec,
boolean immediateExecution)
Convert a synchronous specification into an asynchronous one and provide
blocking code offloading to prevent accidental blocking of the non-blocking
transport.
|
public Async(McpSchema.Implementation serverInfo, McpSchema.ServerCapabilities serverCapabilities, List<McpStatelessServerFeatures.AsyncToolSpecification> tools, Map<String,McpStatelessServerFeatures.AsyncResourceSpecification> resources, List<McpSchema.ResourceTemplate> resourceTemplates, Map<String,McpStatelessServerFeatures.AsyncPromptSpecification> prompts, Map<McpSchema.CompleteReference,McpStatelessServerFeatures.AsyncCompletionSpecification> completions, String instructions)
serverInfo - The server implementation detailsserverCapabilities - The server capabilitiestools - The list of tool specificationsresources - The map of resource specificationsresourceTemplates - The list of resource templatesprompts - The map of prompt specificationsinstructions - The server instructions textpublic static McpStatelessServerFeatures.Async fromSync(McpStatelessServerFeatures.Sync syncSpec, boolean immediateExecution)
syncSpec - a potentially blocking, synchronous specification.immediateExecution - when true, do not offload. Do NOT set to true when
using a non-blocking transport.Copyright © 2025. All rights reserved.