public class McpAsyncServerExchange
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static com.fasterxml.jackson.core.type.TypeReference<java.lang.Object> |
OBJECT_TYPE_REF |
构造器和说明 |
---|
McpAsyncServerExchange(McpSession session,
McpSchema.ClientCapabilities clientCapabilities,
McpSchema.Implementation clientInfo)
|
McpAsyncServerExchange(java.lang.String sessionId,
McpLoggableSession session,
McpSchema.ClientCapabilities clientCapabilities,
McpSchema.Implementation clientInfo,
McpTransportContext transportContext)
Create a new asynchronous exchange with the client.
|
限定符和类型 | 方法和说明 |
---|---|
reactor.core.publisher.Mono<McpSchema.ElicitResult> |
createElicitation(McpSchema.ElicitRequest elicitRequest)
Creates a new elicitation.
|
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.
|
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.
|
reactor.core.publisher.Mono<java.lang.Void> |
loggingNotification(McpSchema.LoggingMessageNotification loggingMessageNotification)
Send a logging message notification to the client.
|
reactor.core.publisher.Mono<java.lang.Object> |
ping()
Sends a ping request to the client.
|
reactor.core.publisher.Mono<java.lang.Void> |
progressNotification(McpSchema.ProgressNotification progressNotification)
Sends a notification to the client that the current progress status has changed for
long-running operations.
|
java.lang.String |
sessionId()
Provides the Session ID.
|
McpTransportContext |
transportContext()
Provides the
McpTransportContext associated with the transport layer. |
public static final com.fasterxml.jackson.core.type.TypeReference<java.lang.Object> OBJECT_TYPE_REF
@Deprecated public McpAsyncServerExchange(McpSession 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 McpAsyncServerExchange(java.lang.String sessionId, McpLoggableSession session, McpSchema.ClientCapabilities clientCapabilities, McpSchema.Implementation clientInfo, McpTransportContext transportContext)
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.transportContext
- context associated with the client as extracted from the
transportpublic McpSchema.ClientCapabilities getClientCapabilities()
public McpSchema.Implementation getClientInfo()
public McpTransportContext transportContext()
McpTransportContext
associated with the transport layer. For
HTTP transports it can contain the metadata associated with the HTTP request that
triggered the processing.public java.lang.String sessionId()
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.ElicitResult> createElicitation(McpSchema.ElicitRequest elicitRequest)
elicitRequest
- The request to create a new elicitationMcpSchema.ElicitRequest
,
McpSchema.ElicitResult
,
Elicitation
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 requestpublic reactor.core.publisher.Mono<java.lang.Void> loggingNotification(McpSchema.LoggingMessageNotification loggingMessageNotification)
loggingMessageNotification
- The logging message to sendpublic reactor.core.publisher.Mono<java.lang.Void> progressNotification(McpSchema.ProgressNotification progressNotification)
progressNotification
- The progress notification to sendpublic reactor.core.publisher.Mono<java.lang.Object> ping()