Bali Share 1.1.18

oracle.bali.share.thread
Class TaskEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--oracle.bali.share.thread.TaskEvent
All Implemented Interfaces:
java.io.Serializable

public class TaskEvent
extends java.util.EventObject

An event supplied to Tasks to provide them with context about their execution.

See Also:
TaskScheduler, Serialized Form

Fields inherited from class java.util.EventObject
source
 
Constructor Summary
TaskEvent(java.lang.Object source, Task task, long expectedTime)
          Creates a TaskEvent.
 
Method Summary
 long getExpectedTime()
          Returns the absolut etime when this task was expected to be executed.
 Task getTask()
          Returns the task for this event.
 long getTimeDelta()
          Returns the difference between when the task expected to be executed and the current time.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TaskEvent

public TaskEvent(java.lang.Object source,
                 Task task,
                 long expectedTime)
Creates a TaskEvent.
Parameters:
source - the source of this event, e.g. the scheduler executing the task.
the - task being executed
expectedTime - the absolute time at which the task expected to be executed
Method Detail

getTask

public Task getTask()
Returns the task for this event.

getExpectedTime

public long getExpectedTime()
Returns the absolut etime when this task was expected to be executed. The time is that returned by System.currentTimeMillis().

getTimeDelta

public final long getTimeDelta()
Returns the difference between when the task expected to be executed and the current time. This value can be used to implement drift-free timing.

Bali Share 1.1.18