planetj.dataengine.task
Class TaskTester

java.lang.Object
  extended byjava.util.TimerTask
      extended byplanetj.util.CMTimerTask
          extended byplanetj.dataengine.task.DataEngineTimerTask
              extended byplanetj.dataengine.task.TaskTester
All Implemented Interfaces:
java.lang.Runnable

public class TaskTester
extends DataEngineTimerTask


Constructor Summary
TaskTester(double pHours)
          TaskTester constructor comment.
 
Method Summary
 TaskEvent getNewTaskEvent()
          Create a new test task event object.
 TestTaskEvent getTestTaskEvent()
          Returns the TestTaskEvent object used when notifying listerns when the task starts and completes.
 void performTask()
          The action to be performed by this task.
protected  void taskCompleted()
          Called when the task is completed.
protected  void taskStarted()
          Called when the task is started.
 
Methods inherited from class planetj.dataengine.task.DataEngineTimerTask
postTask, preTask
 
Methods inherited from class planetj.util.CMTimerTask
addListener, getTaskEvent, removeListener, run, taskFailed
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskTester

public TaskTester(double pHours)
TaskTester constructor comment.

Method Detail

getNewTaskEvent

public TaskEvent getNewTaskEvent()
Create a new test task event object.

Overrides:
getNewTaskEvent in class CMTimerTask
Returns:
TaskEvent

getTestTaskEvent

public TestTaskEvent getTestTaskEvent()
Returns the TestTaskEvent object used when notifying listerns when the task starts and completes.

Returns:
TestTaskEvent

performTask

public void performTask()
The action to be performed by this task.

Specified by:
performTask in class CMTimerTask

taskCompleted

protected void taskCompleted()
Called when the task is completed. Notifies any listeners the task has completed. Any subclass can override this method if they wish to carry out any other actions after the task has been performed.

Note: a call to super.taskCompleted() needs to be called in order to set the completion time for the task as well as to notify any listeners the task has completed.

Overrides:
taskCompleted in class CMTimerTask

taskStarted

protected void taskStarted()
Called when the task is started. Notifies any listeners the task has started. Any subclass can override this method if they wish to initialize anything else. Note: a call to super.taskStarted() needs to be called in order to set the start time for the task as well as to notify any listeners.

Overrides:
taskStarted in class CMTimerTask