public class WebRxStreamableServerTransportProvider extends Object implements McpStreamableServerTransportProvider, IMcpHttpServerTransport
McpStreamableServerTransportProvider| Modifier and Type | Class and Description |
|---|---|
static class |
WebRxStreamableServerTransportProvider.Builder
Builder for creating instances of
WebRxStreamableServerTransportProvider. |
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_BASE_URL
Default base URL for the message endpoint.
|
static String |
ENDPOINT_EVENT_TYPE
Event type for sending the message endpoint URI to clients.
|
static String |
MESSAGE_EVENT_TYPE
Event type for JSON-RPC messages sent through the SSE connection.
|
| Modifier and Type | Method and Description |
|---|---|
static WebRxStreamableServerTransportProvider.Builder |
builder() |
reactor.core.publisher.Mono<Void> |
closeGracefully()
Initiates a graceful shutdown of the transport.
|
String |
getMcpEndpoint() |
reactor.core.publisher.Mono<Void> |
notifyClients(String method,
Object params)
Broadcasts a notification to all connected clients through their SSE connections.
|
List<String> |
protocolVersions()
Returns the protocol version supported by this transport provider.
|
void |
setSessionFactory(McpStreamableServerSession.Factory sessionFactory)
Sets the session factory that will be used to create sessions for new clients.
|
void |
toHttpHandler(org.noear.solon.SolonApp app) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclosepublic static final String MESSAGE_EVENT_TYPE
public static final String ENDPOINT_EVENT_TYPE
public static final String DEFAULT_BASE_URL
public void toHttpHandler(org.noear.solon.SolonApp app)
toHttpHandler in interface IMcpHttpServerTransportpublic String getMcpEndpoint()
getMcpEndpoint in interface IMcpHttpServerTransportpublic List<String> protocolVersions()
McpServerTransportProviderBaseprotocolVersions in interface McpServerTransportProviderBasepublic void setSessionFactory(McpStreamableServerSession.Factory sessionFactory)
McpStreamableServerTransportProvidersetSessionFactory in interface McpStreamableServerTransportProvidersessionFactory - the session factory to be used for initiating client sessionspublic reactor.core.publisher.Mono<Void> notifyClients(String method, Object params)
notifyClients in interface McpServerTransportProviderBasenotifyClients in interface McpStreamableServerTransportProvidermethod - The method name for the notificationparams - The parameters for the notificationMcpSession#sendNotification(String, Map)public reactor.core.publisher.Mono<Void> closeGracefully()
closeGracefully in interface McpServerTransportProviderBasecloseGracefully in interface McpStreamableServerTransportProviderpublic static WebRxStreamableServerTransportProvider.Builder builder()
Copyright © 2025. All rights reserved.