Package io.modelcontextprotocol.spec
Interface McpServerTransportProvider
- All Superinterfaces:
McpServerTransportProviderBase
- All Known Implementing Classes:
HttpServletSseServerTransportProvider,StdioServerTransportProvider
Classic implementation of
McpServerTransportProviderBase for a single outgoing
stream in bidirectional communication (STDIO and the legacy HTTP SSE).- Author:
- Dariusz Jędrzejczyk
-
Method Summary
Modifier and TypeMethodDescriptionvoidsetSessionFactory(McpServerSession.Factory sessionFactory) Sets the session factory that will be used to create sessions for new clients.Methods inherited from interface io.modelcontextprotocol.spec.McpServerTransportProviderBase
close, closeGracefully, notifyClients, protocolVersion
-
Method Details
-
setSessionFactory
Sets the session factory that will be used to create sessions for new clients. An implementation of the MCP server MUST call this method before any MCP interactions take place.- Parameters:
sessionFactory- the session factory to be used for initiating client sessions
-