Package ai.nexconn.chatui.handler
Class StreamMessageHandler
-
- All Implemented Interfaces:
public class StreamMessageHandlerData handler for streaming message operations.
Manages fetching and delivering incremental stream message content. Deduplicates in-flight requests and exposes data via KEY_FETCH_STREAM_MESSAGE.
- Since:
5.16.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceStreamMessageHandler.StateBusiness-state constants for stream message errors.
-
Field Summary
Fields Modifier and Type Field Description public final static DataKey<UiMessage>KEY_FETCH_STREAM_MESSAGE
-
Constructor Summary
Constructors Constructor Description StreamMessageHandler()
-
Method Summary
Modifier and Type Method Description voidfetchStreamMessage(String msgUId, boolean isRetry)Fetches streaming message content for the given message UID. voidstop()-
-
Method Detail
-
fetchStreamMessage
void fetchStreamMessage(String msgUId, boolean isRetry)
Fetches streaming message content for the given message UID.
Deduplicates concurrent requests for the same message. If the message has already been fetched and
isRetryisfalse, the request is skipped.- Parameters:
msgUId- the unique message ID of the stream messageisRetry-trueto force a re-fetch even if the message was already pulled
-
stop
void stop()
-
-
-
-