/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package simizer.processor.tasks;

import simizer.VM;

/**
 * This class is used for simulating a Task on a given node.
 * It takes the quantity of instructions to process.
 * Pass it to the processor to begin execution.
 * @author Sylvain Lefebvre
 */
public abstract class Task {
    private TaskStatus status = TaskStatus.RUNNING;
    
    private TaskSession ts;
    
    public Task(TaskSession ts) {
        this.ts = ts;
    }
    
    public TaskSession getTaskSession() {
        return ts;
    }
    public void setTaskSession(TaskSession ts) {
        this.ts = ts;
    }
    public TaskStatus getStatus() {
        return this.status;
    }
    public abstract void startTask(VM vm, long timestamp);
    
    public void finishTask() {
        this.status = TaskStatus.FINISHED;
    }

    
}

@@ -1,104 +1,4 @@
-/*%0A * To change this template, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0A
 pack
@@ -111,19 +111,16 @@
 en node.
-%0A *
  It take
@@ -124,16 +124,19 @@
 akes the
+%0A *
  quantit
@@ -164,19 +164,16 @@
 process.
-%0A *
  Pass it
@@ -198,16 +198,19 @@
 to begin
+%0A *
  executi
@@ -213,16 +213,19 @@
 cution.%0A
+ *%0A
  * @auth
@@ -277,18 +277,17 @@
  Task %7B%0A
-  
+%0A
   privat
@@ -328,23 +328,17 @@
 UNNING;%0A
-    
 %0A
-  
   privat
@@ -355,23 +355,17 @@
 ion ts;%0A
-    %0A  
+%0A
   public
@@ -384,36 +384,32 @@
 ssion ts) %7B%0A    
-    
 this.ts = ts;%0A  
@@ -412,19 +412,11 @@
 ;%0A  
-  %7D%0A    %0A  
+%7D%0A%0A
   pu
@@ -447,28 +447,24 @@
 Session() %7B%0A
-    
     return t
@@ -464,30 +464,27 @@
 eturn ts;%0A  
-  
 %7D%0A
-  
+%0A
   public voi
@@ -514,28 +514,24 @@
 ssion ts) %7B%0A
-    
     this.ts 
@@ -542,84 +542,11 @@
 ;%0A  
-  %7D%0A    public TaskStatus getStatus() %7B%0A        return this.status;%0A    %7D%0A  
+%7D%0A%0A
   pu
@@ -602,17 +602,11 @@
 p);%0A
-    %0A 
+%0A
   
- 
 publ
@@ -628,20 +628,16 @@
 ask() %7B%0A
-    
     this
@@ -671,18 +671,73 @@
 ED;%0A
-  
   %7D%0A%0A  
-  
+public TaskStatus getStatus() %7B%0A    return this.status;%0A  %7D
 %0A%7D%0A

Update the Task class to conform to the GSG.