Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,18 @@ public Mono<Void> notifyClients(String method, Object params) {
// actually
// doing that.

@Override
public Mono<Void> notifyClient(String sessionId, String method, Object params) {
return Mono.defer(() -> {
McpServerSession session = this.sessions.get(sessionId);
if (session == null) {
logger.debug("Session {} not found", sessionId);
return Mono.empty();
}
return session.sendNotification(method, params);
});
}

/**
* Initiates a graceful shutdown of all the sessions. This method ensures all active
* sessions are properly closed and cleaned up.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,18 @@ public Mono<Void> notifyClients(String method, Object params) {
.then();
}

@Override
public Mono<Void> notifyClient(String sessionId, String method, Object params) {
return Mono.defer(() -> {
McpStreamableServerSession session = this.sessions.get(sessionId);
if (session == null) {
logger.debug("Session {} not found", sessionId);
return Mono.empty();
}
return session.sendNotification(method, params);
});
}

@Override
public Mono<Void> closeGracefully() {
return Mono.defer(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,18 @@ public Mono<Void> notifyClients(String method, Object params) {
.then();
}

@Override
public Mono<Void> notifyClient(String sessionId, String method, Object params) {
return Mono.defer(() -> {
McpServerSession session = this.sessions.get(sessionId);
if (session == null) {
logger.debug("Session {} not found", sessionId);
return Mono.empty();
}
return session.sendNotification(method, params);
});
}

/**
* Initiates a graceful shutdown of the transport. This method:
* <ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,18 @@ public Mono<Void> notifyClients(String method, Object params) {
});
}

@Override
public Mono<Void> notifyClient(String sessionId, String method, Object params) {
return Mono.defer(() -> {
McpStreamableServerSession session = this.sessions.get(sessionId);
if (session == null) {
logger.debug("Session {} not found", sessionId);
return Mono.empty();
}
return session.sendNotification(method, params);
});
}

/**
* Initiates a graceful shutdown of the transport.
* @return A Mono that completes when all cleanup operations are finished
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@

<!-- MCP-->
<!-- TODO Update to 1.0.0-RC1 when released -->
<mcp.sdk.version>1.0.1-SNAPSHOT</mcp.sdk.version>
<mcp.sdk.version>1.1.0-SNAPSHOT</mcp.sdk.version>
<!-- TODO Update to 1.0.0-alpha when released -->
<mcp-annotations.version>1.0.0-SNAPSHOT</mcp-annotations.version>

Expand Down