public static class McpServerFeatures.Async
extends java.lang.Object
构造器和说明 |
---|
Async(McpSchema.Implementation serverInfo,
McpSchema.ServerCapabilities serverCapabilities,
java.util.List<McpServerFeatures.AsyncToolSpecification> tools,
java.util.Map<java.lang.String,McpServerFeatures.AsyncResourceSpecification> resources,
java.util.List<McpSchema.ResourceTemplate> resourceTemplates,
java.util.Map<java.lang.String,McpServerFeatures.AsyncPromptSpecification> prompts,
java.util.Map<McpSchema.CompleteReference,McpServerFeatures.AsyncCompletionSpecification> completions,
java.util.List<java.util.function.BiFunction<McpAsyncServerExchange,java.util.List<McpSchema.Root>,reactor.core.publisher.Mono<java.lang.Void>>> rootsChangeConsumers,
java.lang.String instructions)
Create an instance and validate the arguments.
|
public Async(McpSchema.Implementation serverInfo, McpSchema.ServerCapabilities serverCapabilities, java.util.List<McpServerFeatures.AsyncToolSpecification> tools, java.util.Map<java.lang.String,McpServerFeatures.AsyncResourceSpecification> resources, java.util.List<McpSchema.ResourceTemplate> resourceTemplates, java.util.Map<java.lang.String,McpServerFeatures.AsyncPromptSpecification> prompts, java.util.Map<McpSchema.CompleteReference,McpServerFeatures.AsyncCompletionSpecification> completions, java.util.List<java.util.function.BiFunction<McpAsyncServerExchange,java.util.List<McpSchema.Root>,reactor.core.publisher.Mono<java.lang.Void>>> rootsChangeConsumers, java.lang.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 specificationsrootsChangeConsumers
- The list of consumers that will be notified when
the roots list changesinstructions
- The server instructions text