Class DefaultFileStatusHandler
java.lang.Object
com.alibaba.cloud.ai.dashscope.rag.handler.DefaultFileStatusHandler
- All Implemented Interfaces:
FileStatusHandler
Default file status handler implementation
Handles all file parsing statuses with appropriate logic for each status type. Uses a simple switch-case approach to route status handling to dedicated methods.
Supported statuses:
- PARSE_SUCCESS: File parsing completed successfully
- PARSE_FAILED: File parsing failed with error details
- PARSING/UPLOADED: File parsing still in progress
- Since:
- 2025/12/01
- Author:
- kevin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhandle(DocumentProcessContext context, org.springframework.http.ResponseEntity<DashScopeApiSpec.CommonResponse<DashScopeApiSpec.QueryFileResponseData>> response) Handles file status
-
Constructor Details
-
DefaultFileStatusHandler
public DefaultFileStatusHandler()
-
-
Method Details
-
handle
public FileStatusResult handle(DocumentProcessContext context, org.springframework.http.ResponseEntity<DashScopeApiSpec.CommonResponse<DashScopeApiSpec.QueryFileResponseData>> response) Description copied from interface:FileStatusHandlerHandles file status- Specified by:
handlein interfaceFileStatusHandler- Parameters:
context- document processing contextresponse- API response containing file status information- Returns:
- processing result indicating completion status and success/failure
-