|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jdtaus.core.monitor.Task
public abstract class Task
A task of execution.
A task is a sequence of operations taking time. This class defines
properties to be used by applications to query a task for information and for
cancelling a task. Property indeterminate indicates if a task
supports properties minimum, maximum and progress.
Property cancelable indicates if a task may be cancelled by an
application by setting property cancelled to true.
Properties description and progressDescription hold
presentation descriptions of a task itself and of the work currently
performed by a task.
TaskEvent,
Serialized Form| Field Summary | |
|---|---|
static Comparator |
ASCENDING
Comparator for sorting tasks in ascending order of creation time. |
static Comparator |
DESCENDING
Comparator for sorting tasks in descending order of creation time. |
| Constructor Summary | |
|---|---|
Task()
Creates a new Task instance. |
|
| Method Summary | |
|---|---|
Object |
clone()
Creates and returns a copy of this object. |
boolean |
equals(Object o)
Indicates whether some other object is equal to this one. |
Message |
getDescription()
Getter for property description. |
int |
getMaximum()
Gets the higher end of the progress value. |
int |
getMinimum()
Gets the lower end of the progress value. |
int |
getProgress()
Gets the progress of the task. |
Message |
getProgressDescription()
Getter for property progressDescription. |
long |
getTimestamp()
Getter for property timestamp. |
int |
hashCode()
Returns a hash code value for this object. |
boolean |
isCancelable()
Flag indicating that the task supports property cancelled. |
boolean |
isCancelled()
Flag indicating that the task is cancelled. |
boolean |
isIndeterminate()
Flag indicating if the task supports properties minimum,
maximum and progress. |
void |
setCancelled(boolean value)
Setter for property cancelled. |
String |
toString()
Returns a string representation of the object. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Comparator ASCENDING
Note:
This comparator imposes orderings that are inconsistent with equals.
public static final Comparator DESCENDING
Note:
This comparator imposes orderings that are inconsistent with equals.
| Constructor Detail |
|---|
public Task()
Task instance.
| Method Detail |
|---|
public Object clone()
clone in class Objectpublic final boolean equals(Object o)
Tasks internally cary a UID which is created during instantiation.
This UID is used for comparing o with the instance.
equals in class Objecto - the reference object with which to compare.
true if this object is the same as o;
false otherwise.UIDpublic final Message getDescription()
description.
public final int getMaximum()
IllegalStateException - if the task is indeterminate.public final int getMinimum()
IllegalStateException - if the task is indeterminate.public final int getProgress()
IllegalStateException - if the task is indeterminate.public final Message getProgressDescription()
progressDescription.
null.public final long getTimestamp()
timestamp.
public final int hashCode()
hashCode in class Objectpublic final boolean isCancelable()
cancelled.
true if the task supports property cancelled;
false if property cancelled is ignored by the task.public final boolean isCancelled()
true if the task is cancelled; false else.
IllegalStateException - if the task is not cancelable.public final boolean isIndeterminate()
minimum,
maximum and progress.
true if the operations performed by the task are of
unknown length; false if properties minimum,
maximum and progress hold progress information.public final void setCancelled(boolean value)
cancelled.
Applications may request cancellation of a Task by setting
property cancelled to true. Implementations indicate
theire support for task cancellation by property cancelable.
value - true to cancel the task; false else.
IllegalStateException - if the task is not cancelable or is already
cancelled.public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||