Class TaskStatusPollResponse
java.lang.Object
ai.docling.serve.api.task.response.TaskStatusPollResponse
Represents the response for polling the status of a task.
This class encapsulates details about a specific task's current status,
including its identifier, type, position in a queue, and metadata regarding
its progress and outcomes. The object is serialized and deserialized using
Jackson annotations, ensuring compatibility with JSON-based APIs.
Features:
- Uses a builder pattern with
lombok.Builder for creating immutable objects.
- Serialized to JSON only if fields are non-empty.
- Metadata field for detailed task status is optional.
Fields:
- taskId: The unique identifier for the task.
- taskType: The type of task being processed (optional).
- taskStatus: The current status of the task, as defined in the TaskStatus enum.
- taskPosition: A numerical representation of the task's position in the processing queue.
- taskStatusMetadata: Metadata providing detailed statistics and progress information (optional).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for creatingTaskStatusPollResponseinstances. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull TaskStatusPollResponse.Builderbuilder()Unique task identifier.@Nullable LongPosition of task in the processing queue (if queued).Current status of the task.@Nullable TaskStatusMetadataMetadata about task processing progress.@Nullable StringType of task (convert or chunk).@NonNull TaskStatusPollResponse.Builder@NonNull StringtoString()
-
Method Details
-
builder
-
toBuilder
-
getTaskId
Unique task identifier.- Returns:
- the task ID
-
getTaskType
Type of task (convert or chunk).- Returns:
- the task type, or null if not specified
-
getTaskStatus
Current status of the task.- Returns:
- the task status
-
getTaskPosition
Position of task in the processing queue (if queued).- Returns:
- the queue position, or null if not queued
-
getTaskStatusMetadata
Metadata about task processing progress.- Returns:
- the task metadata, or null if not available
-
toString
-