public class McpStatelessAsyncServer
extends java.lang.Object
| 限定符和类型 | 方法和说明 |
|---|---|
reactor.core.publisher.Mono<java.lang.Void> |
addPrompt(McpStatelessServerFeatures.AsyncPromptSpecification promptSpecification)
Add a new prompt handler at runtime.
|
reactor.core.publisher.Mono<java.lang.Void> |
addResource(McpStatelessServerFeatures.AsyncResourceSpecification resourceSpecification)
Add a new resource handler at runtime.
|
reactor.core.publisher.Mono<java.lang.Void> |
addResourceTemplate(McpStatelessServerFeatures.AsyncResourceTemplateSpecification resourceTemplateSpecification)
Add a new resource template at runtime.
|
reactor.core.publisher.Mono<java.lang.Void> |
addTool(McpStatelessServerFeatures.AsyncToolSpecification toolSpecification)
Add a new tool specification at runtime.
|
void |
close()
Close the server immediately.
|
reactor.core.publisher.Mono<java.lang.Void> |
closeGracefully()
Gracefully closes the server, allowing any in-progress operations to complete.
|
McpSchema.ServerCapabilities |
getServerCapabilities()
Get the server capabilities that define the supported features and functionality.
|
McpSchema.Implementation |
getServerInfo()
Get the server implementation information.
|
reactor.core.publisher.Flux<McpSchema.Prompt> |
listPrompts()
List all registered prompts.
|
reactor.core.publisher.Flux<McpSchema.Resource> |
listResources()
List all registered resources.
|
reactor.core.publisher.Flux<McpSchema.ResourceTemplate> |
listResourceTemplates()
List all registered resource templates.
|
reactor.core.publisher.Flux<McpSchema.Tool> |
listTools()
List all registered tools.
|
reactor.core.publisher.Mono<java.lang.Void> |
removePrompt(java.lang.String promptName)
Remove a prompt handler at runtime.
|
reactor.core.publisher.Mono<java.lang.Void> |
removeResource(java.lang.String resourceUri)
Remove a resource handler at runtime.
|
reactor.core.publisher.Mono<java.lang.Void> |
removeResourceTemplate(java.lang.String uriTemplate)
Remove a resource template at runtime.
|
reactor.core.publisher.Mono<java.lang.Void> |
removeTool(java.lang.String toolName)
Remove a tool handler at runtime.
|
public McpSchema.ServerCapabilities getServerCapabilities()
public McpSchema.Implementation getServerInfo()
public reactor.core.publisher.Mono<java.lang.Void> closeGracefully()
public void close()
public reactor.core.publisher.Mono<java.lang.Void> addTool(McpStatelessServerFeatures.AsyncToolSpecification toolSpecification)
toolSpecification - The tool specification to addpublic reactor.core.publisher.Flux<McpSchema.Tool> listTools()
public reactor.core.publisher.Mono<java.lang.Void> removeTool(java.lang.String toolName)
toolName - The name of the tool handler to removepublic reactor.core.publisher.Mono<java.lang.Void> addResource(McpStatelessServerFeatures.AsyncResourceSpecification resourceSpecification)
resourceSpecification - The resource handler to addpublic reactor.core.publisher.Flux<McpSchema.Resource> listResources()
public reactor.core.publisher.Mono<java.lang.Void> removeResource(java.lang.String resourceUri)
resourceUri - The URI of the resource handler to removepublic reactor.core.publisher.Mono<java.lang.Void> addResourceTemplate(McpStatelessServerFeatures.AsyncResourceTemplateSpecification resourceTemplateSpecification)
resourceTemplateSpecification - The resource template to addpublic reactor.core.publisher.Flux<McpSchema.ResourceTemplate> listResourceTemplates()
public reactor.core.publisher.Mono<java.lang.Void> removeResourceTemplate(java.lang.String uriTemplate)
uriTemplate - The URI template of the resource template to removepublic reactor.core.publisher.Mono<java.lang.Void> addPrompt(McpStatelessServerFeatures.AsyncPromptSpecification promptSpecification)
promptSpecification - The prompt handler to addpublic reactor.core.publisher.Flux<McpSchema.Prompt> listPrompts()
public reactor.core.publisher.Mono<java.lang.Void> removePrompt(java.lang.String promptName)
promptName - The name of the prompt handler to remove