Interface TaskAwareRequest

    • Method Summary

      Modifier and Type Method Description
      default Task createTask​(long id, java.lang.String type, java.lang.String action, TaskId parentTaskId, java.util.Map<java.lang.String,​java.lang.String> headers)
      Returns the task object that should be used to keep track of the processing of the request.
      default java.lang.String getDescription()
      Returns optional description of the request to be displayed by the task manager
      TaskId getParentTask()
      Get a reference to the task that created this request.
      default void setParentTask​(java.lang.String parentTaskNode, long parentTaskId)
      Set a reference to task that caused this task to be run.
      void setParentTask​(TaskId taskId)
      Set a reference to task that created this request.
    • Method Detail

      • setParentTask

        default void setParentTask​(java.lang.String parentTaskNode,
                                   long parentTaskId)
        Set a reference to task that caused this task to be run.
      • setParentTask

        void setParentTask​(TaskId taskId)
        Set a reference to task that created this request.
      • getParentTask

        TaskId getParentTask()
        Get a reference to the task that created this request. Implementers should default to TaskId.EMPTY_TASK_ID, meaning "there is no parent".
      • createTask

        default Task createTask​(long id,
                                java.lang.String type,
                                java.lang.String action,
                                TaskId parentTaskId,
                                java.util.Map<java.lang.String,​java.lang.String> headers)
        Returns the task object that should be used to keep track of the processing of the request. A request can override this method and return null to avoid being tracked by the task manager.
      • getDescription

        default java.lang.String getDescription()
        Returns optional description of the request to be displayed by the task manager