Package com.atlassian.jira.task.context
Interface Context
@PublicApi
public interface Context
Task context. Can be used to provide status updates to clients.
Null is not allowed for any method arguments or return values.
Instances should internally protect any state from concurrent updates and so should require no external synchronisation if shared by multiple threads.
- Since:
- v3.13
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
A builder for constructing a background taskContext
.static interface
A Task is a unit of work. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns number of tasks not started yet, after finishing which progress is complete.void
Set the name of the current step.Start a new sub-task.
-
Method Details
-
setName
Set the name of the current step.- Parameters:
name
- the name
-
start
Start a new sub-task. These should be completed in afinally
block.- Parameters:
input
- the object of the task, can be used for tracking currently executing tasks.- Returns:
- the new Task.
-
getNumberOfTasksToCompletion
int getNumberOfTasksToCompletion()Returns number of tasks not started yet, after finishing which progress is complete.
-