dongrade java version from 21 to 17
This commit is contained in:
parent
3abd93a323
commit
52e6644b22
1 changed files with 16 additions and 44 deletions
|
|
@ -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");
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue