Class MuleServerSession
java.lang.Object
com.mulesoft.connectors.mcp.internal.server.connection.McpSessionDecorator
com.mulesoft.connectors.mcp.internal.server.connection.MuleServerSession
- All Implemented Interfaces:
io.modelcontextprotocol.spec.McpSession,Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMuleServerSession(io.modelcontextprotocol.spec.McpServerSession delegate, io.modelcontextprotocol.spec.McpServerTransport transport) -
Method Summary
Modifier and TypeMethodDescriptiongetId()io.modelcontextprotocol.spec.McpServerTransportreactor.core.publisher.Mono<Void>handle(io.modelcontextprotocol.spec.McpSchema.JSONRPCMessage message) voidonInitialize(Runnable onInitialize) restoreFrom(io.modelcontextprotocol.spec.McpServerSession newDelegate, io.modelcontextprotocol.spec.McpServerTransport transport) This method is part of the workaround for issues {@link https://github.com/modelcontextprotocol/java-sdk/issues/273} and {@link https://github.com/modelcontextprotocol/java-sdk/issues/274}.Methods inherited from class com.mulesoft.connectors.mcp.internal.server.connection.McpSessionDecorator
close, closeGracefully, sendNotification, sendNotification, sendRequest
-
Constructor Details
-
MuleServerSession
public MuleServerSession(io.modelcontextprotocol.spec.McpServerSession delegate, io.modelcontextprotocol.spec.McpServerTransport transport)
-
-
Method Details
-
handle
public reactor.core.publisher.Mono<Void> handle(io.modelcontextprotocol.spec.McpSchema.JSONRPCMessage message) -
restoreFrom
public MuleServerSession restoreFrom(io.modelcontextprotocol.spec.McpServerSession newDelegate, io.modelcontextprotocol.spec.McpServerTransport transport) This method is part of the workaround for issues {@link https://github.com/modelcontextprotocol/java-sdk/issues/273} and {@link https://github.com/modelcontextprotocol/java-sdk/issues/274}.TODO: Future maintainers of this connector should be on the watch-out for resolution, contributing a fix or (in worst case scenario)
- Parameters:
newDelegate- the brand-new session instance associated with the present requesttransport- the brand-new transport instance associated with the present request- Returns:
- a new
MuleServerSessionwith a session that is valid for the present requset
-
getId
-
getTransport
public io.modelcontextprotocol.spec.McpServerTransport getTransport() -
onInitialize
-