public static class WebRxStreamableServerTransportProvider.StreamableHttpServerTransport extends Object implements McpServerTransport
| Constructor and Description |
|---|
StreamableHttpServerTransport(org.noear.solon.core.handle.Context ctx,
com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Void> |
closeGracefully()
Closes the transport connection and releases any associated resources
asynchronously.
|
reactor.core.publisher.Mono<Void> |
sendMessage(McpSchema.JSONRPCMessage message)
Sends a message to the peer asynchronously.
|
<T> T |
unmarshalFrom(Object data,
com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
Unmarshals the given data into an object of the specified type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclosepublic StreamableHttpServerTransport(org.noear.solon.core.handle.Context ctx,
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public reactor.core.publisher.Mono<Void> sendMessage(McpSchema.JSONRPCMessage message)
McpTransportThis method handles the transmission of messages to the server in an asynchronous manner. Messages are sent in JSON-RPC format as specified by the MCP protocol.
sendMessage in interface McpTransportmessage - the McpSchema.JSONRPCMessage to be sent to the serverMono that completes when the message has been sentpublic <T> T unmarshalFrom(Object data, com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
McpTransportunmarshalFrom in interface McpTransportT - the type of the object to unmarshaldata - the data to unmarshaltypeRef - the type reference for the object to unmarshalpublic reactor.core.publisher.Mono<Void> closeGracefully()
McpTransportcloseGracefully in interface McpTransportMono that completes when the connection has been closed.Copyright © 2025. All rights reserved.