Class TLspTaskExecutorEvent

java.lang.Object
java.util.EventObject
com.luciad.view.lightspeed.services.asynchronous.TLspTaskExecutorEvent
All Implemented Interfaces:
Serializable

public class TLspTaskExecutorEvent extends EventObject

A task executor event describes the changes to a task from a ILspTaskExecutor

Since:
2012.0
See Also:
  • Constructor Details

    • TLspTaskExecutorEvent

      public TLspTaskExecutorEvent(TLspTaskExecutorRunnable aRunnable, long aTimeTaken, int aOtherTaskCount, TLspTaskExecutorEvent.Type aType, Throwable aThrowable)
      Creates a task executor event with the given parameters
      Parameters:
      aRunnable - A delegate
      aTimeTaken - The time the runnable was in progress in milliseconds, or -1 if it could not be determined how long this task has been in progress.
      aOtherTaskCount - The amount of other tasks still scheduled for the same source
      aType - The type of event
      aThrowable - A throwable that was thrown during the execution of the runnable. Can be null.
  • Method Details

    • getType

      public TLspTaskExecutorEvent.Type getType()
      Gets the type of this executor event.
      Returns:
      a Type
    • getRunnable

      public TLspTaskExecutorRunnable getRunnable()
      Gets the task that is associated with this event.
      Returns:
      The task that is associated with this event
    • getTimeTaken

      public long getTimeTaken()
      Returns the time that the time took in milliseconds. If no information could be retrieved about the time it took to complete this task, -1 will be returned.
      Returns:
      The time taken in milliseconds, or -1 if it could not be determined how long this task has been in progress.
    • getOtherTaskCount

      public int getOtherTaskCount()
      Returns the amount of other tasks that are currently scheduled for the same source.
      Returns:
      The amount of other tasks currently scheduled for the same source.
    • getThrowable

      public Throwable getThrowable()
      Returns the throwable that was thrown during execution of this task. Only relevant if getType() was Exception
      Returns:
      A throwable, or null if the task did not produce an exception