Interface Tasks

All Known Subinterfaces:
TaskRegistry
All Known Implementing Classes:
DefaultTaskRegistry

public interface Tasks
Façade interface for MCP tasks
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    @Nullable Task
    get(String taskId)
     
    boolean
    remove(String taskId)
    Removes a task from the registry, e.g. because it was removed on the caller's side.
  • Method Details

    • get

      @Nullable Task get(String taskId)
    • create

      Task create()
    • create

      Task create(TaskOptions options)
    • remove

      boolean remove(String taskId)
      Removes a task from the registry, e.g. because it was removed on the caller's side. A non-terminal task is cancelled first (firing a final status notification) so its Task.completion() doesn't hang forever.
      Returns:
      true if a task with this id existed and was removed