public class DefaultMcpStreamableServerSessionFactory extends java.lang.Object implements McpStreamableServerSession.Factory
McpStreamableServerSession.Factory
.构造器和说明 |
---|
DefaultMcpStreamableServerSessionFactory(java.time.Duration requestTimeout,
McpStreamableServerSession.InitRequestHandler initRequestHandler,
java.util.Map<java.lang.String,McpRequestHandler<?>> requestHandlers,
java.util.Map<java.lang.String,McpNotificationHandler> notificationHandlers)
Constructs an instance
|
限定符和类型 | 方法和说明 |
---|---|
McpStreamableServerSession.McpStreamableServerSessionInit |
startSession(McpSchema.InitializeRequest initializeRequest)
Given an initialize request, create a composite for the session initialization
|
public DefaultMcpStreamableServerSessionFactory(java.time.Duration requestTimeout, McpStreamableServerSession.InitRequestHandler initRequestHandler, java.util.Map<java.lang.String,McpRequestHandler<?>> requestHandlers, java.util.Map<java.lang.String,McpNotificationHandler> notificationHandlers)
requestTimeout
- timeout for requestsinitRequestHandler
- initialization request handlerrequestHandlers
- map of MCP request handlers keyed by method namenotificationHandlers
- map of MCP notification handlers keyed by method namepublic McpStreamableServerSession.McpStreamableServerSessionInit startSession(McpSchema.InitializeRequest initializeRequest)
McpStreamableServerSession.Factory
startSession
在接口中 McpStreamableServerSession.Factory
initializeRequest
- the initialization request from the client