接口 TaskManager
- 所有已知实现类:
InMemoryTaskManager
public interface TaskManager
Interface for managing tasks in the A2A system.
The TaskManager is responsible for handling the lifecycle and state of tasks.
-
方法概要
修饰符和类型方法说明reactor.core.publisher.Mono<Task>applyArtifactUpdate(Task task, TaskArtifactUpdateEvent event) Apply artifact update with append support from TaskArtifactUpdateEventreactor.core.publisher.Mono<Task>applyStatusUpdate(Task task, TaskStatusUpdateEvent event) Apply status update with append support from TaskStatusUpdateEventreactor.core.publisher.Mono<Task>applyTaskUpdate(Task task, TaskUpdate update) apply task update for taskreactor.core.publisher.Mono<Task>applyTaskUpdate(Task task, List<TaskUpdate> taskUpdates) apply take update for taskGets a task by its ID.getTaskNotification(String taskId) get task notification configloadOrCreateContext(MessageSendParams params) Load or create a new task.voidregister task notification config
-
方法详细资料
-
loadOrCreateContext
Load or create a new task.- 参数:
params- The task param to create- 返回:
- The created task with a generated ID
-
getTask
Gets a task by its ID.- 参数:
taskId- The ID of the task- 返回:
- The task with the specified ID, or null if not found
-
applyTaskUpdate
apply take update for task- 参数:
task- TaskContexttaskUpdates- taskUpdate TaskStatus or Artifact update- 返回:
- mono of task
-
applyTaskUpdate
apply task update for task- 参数:
task- TaskContextupdate- tash update TaskStatus or Artifact update- 返回:
- mono of task
-
applyStatusUpdate
Apply status update with append support from TaskStatusUpdateEvent- 参数:
task- The task to updateevent- The TaskStatusUpdateEvent containing status information- 返回:
- Updated task
-
applyArtifactUpdate
Apply artifact update with append support from TaskArtifactUpdateEvent- 参数:
task- The task to updateevent- The TaskArtifactUpdateEvent containing artifact and append information- 返回:
- Updated task
-
registerTaskNotification
register task notification config- 参数:
config- notification config
-
getTaskNotification
get task notification config- 参数:
taskId- task id- 返回:
- notification config
-