Class TLspTaskExecutorEvent
java.lang.Object
java.util.EventObject
com.luciad.view.lightspeed.services.asynchronous.TLspTaskExecutorEvent
- All Implemented Interfaces:
Serializable
A task executor event describes the changes to a task from a
ILspTaskExecutor
- Since:
- 2012.0
- See Also:
-
Nested Class Summary
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionTLspTaskExecutorEvent
(TLspTaskExecutorRunnable aRunnable, long aTimeTaken, int aOtherTaskCount, TLspTaskExecutorEvent.Type aType, Throwable aThrowable) Creates a task executor event with the given parameters -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the amount of other tasks that are currently scheduled for the same source.Gets the task that is associated with this event.Returns the throwable that was thrown during execution of this task.long
Returns the time that the time took in milliseconds.getType()
Gets the type of this executor event.Methods inherited from class java.util.EventObject
getSource, toString
-
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 delegateaTimeTaken
- 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 sourceaType
- The type of eventaThrowable
- A throwable that was thrown during the execution of the runnable. Can be null.
-
-
Method Details
-
getType
Gets the type of this executor event.- Returns:
- a
Type
-
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
Returns the throwable that was thrown during execution of this task. Only relevant ifgetType()
wasException
- Returns:
- A throwable, or null if the task did not produce an exception
-