Interface ExternalCollectCommunication
- All Known Subinterfaces:
CommunicationAggregation
- All Known Implementing Classes:
DefaultCommunicationAggregation
public interface ExternalCollectCommunication
Communication interface for collecting aggregated responses from multiple external (client-facing) servers.
Provides both synchronous and asynchronous (future-based) methods for broadcasting requests to all external servers and gathering their responses, as well as logic-server binding and direct message writing to user sessions.
- Since:
- 25.1
- Author:
- 渔民小镇
- date:
- 2025-09-07
-
Method Summary
Modifier and TypeMethodDescriptionSynchronously bind a user session to a specific logic server.Asynchronously bind a user session to a specific logic server.Synchronously call all external servers and collect their responses.Asynchronously call all external servers and collect their responses.voidwriteMessage(UserResponseMessage message) Write a response message directly to a user session on the external server.
-
Method Details
-
callCollectExternalFuture
CompletableFuture<ResponseCollectExternal> callCollectExternalFuture(ExternalRequestMessage message) Asynchronously call all external servers and collect their responses.- Parameters:
message- the external request message to broadcast- Returns:
- a future that completes with the aggregated response from all external servers
-
callCollectExternal
Synchronously call all external servers and collect their responses.- Parameters:
message- the external request message to broadcast- Returns:
- the aggregated response from all external servers
-
bindingLogicServerFuture
Asynchronously bind a user session to a specific logic server.- Parameters:
message- the binding request message- Returns:
- a future that completes with the common response
-
bindingLogicServer
Synchronously bind a user session to a specific logic server.- Parameters:
message- the binding request message- Returns:
- the common response indicating success or failure
-
writeMessage
Write a response message directly to a user session on the external server.- Parameters:
message- the user response message to deliver
-