de.esprit.appsuite.task

## Class TaskId

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.common.util.TransferableObject
    - - de.esprit.appsuite.task.TaskId

- All Implemented Interfaces:
    Renderable, DeepCloneable, Dumpable, java.io.Serializable, java.lang.Cloneable
  Direct Known Subclasses:
    PseudoTaskId, RemoteTaskId

      public class TaskId
      extends TransferableObject
      implements Renderable

  This is a unique identifier for an `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.
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `TaskId(long tid, java.lang.String taskName, TaskType taskType)`
    `` | `TaskId(java.lang.String taskName, TaskType taskType)`

  - ### Method Summary

    Methods
    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.

    - ### Methods inherited from class de.esprit.common.util.TransferableObject

      `deepClone`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toString`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### TaskId

          public TaskId(java.lang.String taskName,
                TaskType taskType)

    - #### TaskId

          protected TaskId(long tid,
                java.lang.String taskName,
                TaskType taskType)

  - ### Method Detail

    - #### getState

          public TaskState getState()

      Tells whether this TaskId is valid. It is valid from the time of submit until the task has finished.

    - #### setRunning

          public void setRunning()

    - #### setFinished

          public void setFinished()

    - #### isRunning

          public boolean isRunning()

    - #### isFinished

          public boolean isFinished()

    - #### getStartTime

          public java.sql.Timestamp getStartTime()

      May be null if not yet started.

    - #### getFinishTime

          public java.sql.Timestamp getFinishTime()

      May be null if not yet finished.

    - #### getTID

          public long getTID()

    - #### getName

          public java.lang.String getName()

    - #### setName

          public void setName(java.lang.String taskName)

    - #### getType

          public TaskType getType()

    - #### setType

          public void setType(TaskType taskType)

    - #### clone

          public TaskId clone()

      Overrides:
        `clone` in class `TransferableObject`

    - #### getRenderColor

          public java.awt.Color getRenderColor()

      Specified by:
        `getRenderColor` in interface `Renderable`

    - #### getRenderIcon

          public javax.swing.Icon getRenderIcon()

      Specified by:
        `getRenderIcon` in interface `Renderable`

    - #### getRenderText

          public java.lang.String getRenderText()

      Specified by:
        `getRenderText` in interface `Renderable`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public final int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toString

          public ToString toString(ToString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing ToString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toString` in interface `Dumpable`
      Overrides:
        `toString` in class `DumpableObject`

    - #### toDumpString

          public DumpString toDumpString(DumpString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing DumpString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toDumpString` in interface `Dumpable`
      Overrides:
        `toDumpString` in class `DumpableObject`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.