public class McpAsyncServerExchange extends Object
| Modifier and Type | Field and Description |
|---|---|
static com.fasterxml.jackson.core.type.TypeReference<Object> |
OBJECT_TYPE_REF |
| Constructor and Description |
|---|
McpAsyncServerExchange(McpSession session,
McpSchema.ClientCapabilities clientCapabilities,
McpSchema.Implementation clientInfo)
|
McpAsyncServerExchange(String sessionId,
McpLoggableSession session,
McpSchema.ClientCapabilities clientCapabilities,
McpSchema.Implementation clientInfo,
McpTransportContext transportContext)
Create a new asynchronous exchange with the client.
|
| Modifier and Type | Method and Description |
|---|---|
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(String cursor)
Retrieves a paginated list of roots provided by the client.
|
reactor.core.publisher.Mono<Void> |
loggingNotification(McpSchema.LoggingMessageNotification loggingMessageNotification)
Send a logging message notification to the client.
|
reactor.core.publisher.Mono<Object> |
ping()
Sends a ping request to the client.
|
reactor.core.publisher.Mono<Void> |
progressNotification(McpSchema.ProgressNotification progressNotification)
Sends a notification to the client that the current progress status has changed for
long-running operations.
|
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<Object> OBJECT_TYPE_REF
@Deprecated public McpAsyncServerExchange(McpSession session, McpSchema.ClientCapabilities clientCapabilities, McpSchema.Implementation clientInfo)
McpAsyncServerExchange(String, McpLoggableSession, McpSchema.ClientCapabilities, McpSchema.Implementation, McpTransportContext)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(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 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(String cursor)
cursor - Optional pagination cursor from a previous list requestpublic reactor.core.publisher.Mono<Void> loggingNotification(McpSchema.LoggingMessageNotification loggingMessageNotification)
loggingMessageNotification - The logging message to sendpublic reactor.core.publisher.Mono<Void> progressNotification(McpSchema.ProgressNotification progressNotification)
progressNotification - The progress notification to sendpublic reactor.core.publisher.Mono<Object> ping()
Copyright © 2025. All rights reserved.