public class TaskId extends TransferableObject implements Renderable
AsyncTask
instance.
Note that a TaskId
is the key for task-registration within the TaskManager
.
You receive a TaskId
by submitting a task and you may use it to cancel the task.
Important note: The methods of TaskId
are intentionally NOT synchronized. This is because
changes are only done by the thread that is executing the task.
Whenever the user receives a TaskId
, it is a stable copy of the actual one in use.Modifier | Constructor and Description |
---|---|
protected |
TaskId(long tid,
java.lang.String taskName,
TaskType taskType) |
|
TaskId(java.lang.String taskName,
TaskType taskType) |
Modifier and Type | Method and Description |
---|---|
TaskId |
clone() |
boolean |
equals(java.lang.Object obj) |
java.sql.Timestamp |
getFinishTime()
May be null if not yet finished.
|
java.lang.String |
getName() |
java.awt.Color |
getRenderColor() |
javax.swing.Icon |
getRenderIcon() |
java.lang.String |
getRenderText() |
java.sql.Timestamp |
getStartTime()
May be null if not yet started.
|
TaskState |
getState()
Tells whether this TaskId is valid.
|
long |
getTID() |
TaskType |
getType() |
int |
hashCode() |
boolean |
isFinished() |
boolean |
isRunning() |
void |
setFinished() |
void |
setName(java.lang.String taskName) |
void |
setRunning() |
void |
setType(TaskType taskType) |
DumpString |
toDumpString(DumpString s)
This method allows subclasses to add values to the existing DumpString of the superclass.
|
ToString |
toString(ToString s)
This method allows subclasses to add values to the existing ToString of the superclass.
|
deepClone
configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toString
public TaskId(java.lang.String taskName, TaskType taskType)
protected TaskId(long tid, java.lang.String taskName, TaskType taskType)
public TaskState getState()
public void setRunning()
public void setFinished()
public boolean isRunning()
public boolean isFinished()
public java.sql.Timestamp getStartTime()
public java.sql.Timestamp getFinishTime()
public long getTID()
public java.lang.String getName()
public void setName(java.lang.String taskName)
public TaskType getType()
public void setType(TaskType taskType)
public TaskId clone()
clone
in class TransferableObject
public java.awt.Color getRenderColor()
getRenderColor
in interface Renderable
public javax.swing.Icon getRenderIcon()
getRenderIcon
in interface Renderable
public java.lang.String getRenderText()
getRenderText
in interface Renderable
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public final int hashCode()
hashCode
in class java.lang.Object
public ToString toString(ToString s)
Dumpable
toString
in interface Dumpable
toString
in class DumpableObject
public DumpString toDumpString(DumpString s)
Dumpable
toDumpString
in interface Dumpable
toDumpString
in class DumpableObject
Copyright © 2014 EsprIT-Systems. All Rights Reserved.