public class

TaskProgressEvent

extends Object
implements Serializable
java.lang.Object
   ↳ com.atlassian.jira.task.TaskProgressEvent

Class Overview

Event that represents the progress of a long running task.

Summary

Public Constructors
TaskProgressEvent(Long taskId, long elapsedRunTime, long taskProgress, String currentSubTask, String message)
Create an event and initialise it with the passed parameters.
Public Methods
Date getCreationTimeStamp()
Find the time the event was created.
String getCurrentSubTask()
This returns the name of the current sub-task stored in the event.
long getElapsedRunTime()
Return the elasped run time stored in the event.
String getMessage()
Get the message associated with the event.
Long getTaskId()
Gets the id of the TaskDescriptor associated with the task that is running.
long getTaskProgress()
The progress stored in the event.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public TaskProgressEvent (Long taskId, long elapsedRunTime, long taskProgress, String currentSubTask, String message)

Create an event and initialise it with the passed parameters.

Parameters
taskId the identifier of the task that generated the event.
elapsedRunTime the elapsed run time to store in the event.
taskProgress the progress to store in the event.
currentSubTask the current sub-task to store in the event.
message the current message to store in the event.

Public Methods

public Date getCreationTimeStamp ()

Find the time the event was created.

Returns
  • the time that this event was created. Can never be null.

public String getCurrentSubTask ()

This returns the name of the current sub-task stored in the event. It may be null.

Returns
  • the name of the current sub-task.

public long getElapsedRunTime ()

Return the elasped run time stored in the event.

Returns
  • the elapsed run time.

public String getMessage ()

Get the message associated with the event.

Returns
  • the message associated with the event

public Long getTaskId ()

Gets the id of the TaskDescriptor associated with the task that is running.

Returns
  • the id of the TaskDescriptor associated with the task that is running. It cannot be null.

public long getTaskProgress ()

The progress stored in the event.

Returns
  • It will commonly be a number in [0,100] to represent a percentage, though, this is left up to the task to define. A value of -1 can be returned to indicate that the progress is unknown.