dongrade java version from 21 to 17

This commit is contained in:
Christian Tzolov 2024-12-10 21:11:27 +01:00
commit 52e6644b22

View file

@ -38,21 +38,18 @@ public class DefaultMcpSession implements McpSession {
this.transport = transport;
this.transport.setInboudMessageHandler(message -> {
switch (message) {
case McpSchema.JSONRPCResponse response -> {
var sink = pendingResponses.remove(response.id());
if (sink == null) {
System.out.println("Unexpected response for unkown id " + response.id());
} else {
sink.success(response);
}
}
case McpSchema.JSONRPCRequest request -> {
System.out.println("Client does not yet support server requests");
}
case McpSchema.JSONRPCNotification notification -> {
System.out.println("Notifications not yet supported");
if ( message instanceof McpSchema.JSONRPCResponse response) {
var sink = pendingResponses.remove(response.id());
if (sink == null) {
System.out.println("Unexpected response for unkown id " + response.id());
} else {
sink.success(response);
}
} else if ( message instanceof McpSchema.JSONRPCRequest request) {
System.out.println("Client does not yet support server requests");
} else if ( message instanceof McpSchema.JSONRPCNotification notification) {
System.out.println("Notifications not yet supported");
}
});