public class McpAsyncServerExchange
extends java.lang.Object
构造器和说明 |
---|
McpAsyncServerExchange(McpServerSession session,
McpSchema.ClientCapabilities clientCapabilities,
McpSchema.Implementation clientInfo)
Create a new asynchronous exchange with the client.
|
限定符和类型 | 方法和说明 |
---|---|
reactor.core.publisher.Mono<McpSchema.CreateMessageResult> |
createMessage(McpSchema.CreateMessageRequest createMessageRequest)
Create a new message using the sampling capabilities of the client.
|
McpSchema.ClientCapabilities |
getClientCapabilities()
Get the client capabilities that define the supported features and functionality.
|
McpSchema.Implementation |
getClientInfo()
Get the client implementation information.
|
McpServerSession |
getSession() |
reactor.core.publisher.Mono<McpSchema.ListRootsResult> |
listRoots()
Retrieves the list of all roots provided by the client.
|
reactor.core.publisher.Mono<McpSchema.ListRootsResult> |
listRoots(java.lang.String cursor)
Retrieves a paginated list of roots provided by the client.
|
public McpAsyncServerExchange(McpServerSession session, McpSchema.ClientCapabilities clientCapabilities, McpSchema.Implementation clientInfo)
session
- The server session representing a 1-1 interaction.clientCapabilities
- The client capabilities that define the supported
features and functionality.clientInfo
- The client implementation information.public McpServerSession getSession()
public McpSchema.ClientCapabilities getClientCapabilities()
public McpSchema.Implementation getClientInfo()
public reactor.core.publisher.Mono<McpSchema.CreateMessageResult> createMessage(McpSchema.CreateMessageRequest createMessageRequest)
createMessageRequest
- The request to create a new messageMcpSchema.CreateMessageRequest
,
McpSchema.CreateMessageResult
,
Sampling
Specificationpublic reactor.core.publisher.Mono<McpSchema.ListRootsResult> listRoots()
public reactor.core.publisher.Mono<McpSchema.ListRootsResult> listRoots(java.lang.String cursor)
cursor
- Optional pagination cursor from a previous list request