@PublicApi public interface

Context

com.atlassian.jira.task.context.Context

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

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.

Summary

Nested Classes
class Context.Builder A builder for constructing a background task Context
interface Context.Task A Task is a unit of work. 
Public Methods
int getNumberOfTasksToCompletion()
Returns number of tasks not started yet, after finishing which progress is complete.
void setName(String name)
Set the name of the current step.
Context.Task start(Object input)
Start a new sub-task.

Public Methods

public int getNumberOfTasksToCompletion ()

Returns number of tasks not started yet, after finishing which progress is complete.

public void setName (String name)

Set the name of the current step.

Parameters
name the name

public Context.Task start (Object input)

Start a new sub-task. These should be completed in a

finally
block.

Parameters
input the object of the task, can be used for tracking currently executing tasks.
Returns
  • the new Task.