com.benfante.splasher.task
Class SimpleTask

java.lang.Object
  extended by com.benfante.splasher.task.AbstractTask
      extended by com.benfante.splasher.task.SimpleTask
All Implemented Interfaces:
Task, java.lang.Runnable

public class SimpleTask
extends AbstractTask

A simple atomic task. It notifies the observer(s) at the start and after the completion.

Version:
$Id: SimpleTask.java,v 1.2 2006-04-01 07:02:28 lucio Exp $
Author:
Lucio Benfante lucio@benfante.com

Field Summary
 
Fields inherited from class com.benfante.splasher.task.AbstractTask
completed, COMPLETED, description, weight
 
Constructor Summary
SimpleTask(java.lang.Runnable code, java.lang.String description, int weight)
          Creates a new instance of SimpleTask
 
Method Summary
 void run()
          Execute the task
 
Methods inherited from class com.benfante.splasher.task.AbstractTask
add, getCompleted, getDescription, getWeight, isCompleted, notifyChanges
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTask

public SimpleTask(java.lang.Runnable code,
                  java.lang.String description,
                  int weight)
Creates a new instance of SimpleTask

Parameters:
code - The code executed by the task
description - A description for the task
weight - The weight of this task (relative to the other tasks)
Method Detail

run

public void run()
Execute the task