Module org.nasdanika.ai.mcp.sse
Package org.nasdanika.ai.mcp.sse
Class HttpServerRoutesTransportProvider
java.lang.Object
org.nasdanika.ai.mcp.sse.HttpServerRoutesTransportProvider
- All Implemented Interfaces:
io.modelcontextprotocol.spec.McpServerTransportProvider
public class HttpServerRoutesTransportProvider
extends Object
implements io.modelcontextprotocol.spec.McpServerTransportProvider
Reactor Netty implementation of
McpServerTransportProvider.-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHttpServerRoutesTransportProvider(com.fasterxml.jackson.databind.ObjectMapper objectMapper, String baseUrl, String messageEndpoint, String sseEndpoint, reactor.netty.http.server.HttpServerRoutes httpServerRoutes, io.opentelemetry.api.trace.Tracer tracer, boolean resolveRemoteHostName, io.opentelemetry.context.propagation.TextMapPropagator propagator, BiConsumer<String, Long> durationConsumer) HttpServerRoutesTransportProvider(com.fasterxml.jackson.databind.ObjectMapper objectMapper, String messageEndpoint, String sseEndpoint, reactor.netty.http.server.HttpServerRoutes httpServerRoutes, io.opentelemetry.api.trace.Tracer tracer, boolean resolveRemoteHostName, io.opentelemetry.context.propagation.TextMapPropagator propagator, BiConsumer<String, Long> durationConsumer) HttpServerRoutesTransportProvider(com.fasterxml.jackson.databind.ObjectMapper objectMapper, String messageEndpoint, reactor.netty.http.server.HttpServerRoutes httpServerRoutes, io.opentelemetry.api.trace.Tracer tracer, boolean resolveRemoteHostName, io.opentelemetry.context.propagation.TextMapPropagator propagator, BiConsumer<String, Long> durationConsumer) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()reactor.core.publisher.Mono<Void> reactor.core.publisher.Mono<Void> notifyClients(String method, Object params) voidsetSessionFactory(io.modelcontextprotocol.spec.McpServerSession.Factory sessionFactory) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.modelcontextprotocol.spec.McpServerTransportProvider
close
-
Field Details
-
DEFAULT_SSE_ENDPOINT
- See Also:
-
DEFAULT_BASE_URL
- See Also:
-
MESSAGE_EVENT_TYPE
- See Also:
-
ENDPOINT_EVENT_TYPE
- See Also:
-
-
Constructor Details
-
HttpServerRoutesTransportProvider
public HttpServerRoutesTransportProvider(com.fasterxml.jackson.databind.ObjectMapper objectMapper, String messageEndpoint, reactor.netty.http.server.HttpServerRoutes httpServerRoutes, io.opentelemetry.api.trace.Tracer tracer, boolean resolveRemoteHostName, io.opentelemetry.context.propagation.TextMapPropagator propagator, BiConsumer<String, Long> durationConsumer) -
HttpServerRoutesTransportProvider
public HttpServerRoutesTransportProvider(com.fasterxml.jackson.databind.ObjectMapper objectMapper, String messageEndpoint, String sseEndpoint, reactor.netty.http.server.HttpServerRoutes httpServerRoutes, io.opentelemetry.api.trace.Tracer tracer, boolean resolveRemoteHostName, io.opentelemetry.context.propagation.TextMapPropagator propagator, BiConsumer<String, Long> durationConsumer) -
HttpServerRoutesTransportProvider
public HttpServerRoutesTransportProvider(com.fasterxml.jackson.databind.ObjectMapper objectMapper, String baseUrl, String messageEndpoint, String sseEndpoint, reactor.netty.http.server.HttpServerRoutes httpServerRoutes, io.opentelemetry.api.trace.Tracer tracer, boolean resolveRemoteHostName, io.opentelemetry.context.propagation.TextMapPropagator propagator, BiConsumer<String, Long> durationConsumer)
-
-
Method Details
-
builder
-
setSessionFactory
- Specified by:
setSessionFactoryin interfaceio.modelcontextprotocol.spec.McpServerTransportProvider
-
notifyClients
- Specified by:
notifyClientsin interfaceio.modelcontextprotocol.spec.McpServerTransportProvider
-
closeGracefully
- Specified by:
closeGracefullyin interfaceio.modelcontextprotocol.spec.McpServerTransportProvider
-