vgrid.task
Interface Task

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AbstractTask, DonauTaskRenamed, EnnsTaskRenamed, NullTask, TestExceptionTask, TestTask, VeryActiveTestTask

public interface Task
extends java.io.Serializable

A vgrid task. If your distributed program implements the task interface it can be run within the vgrid framework.

A task has to fulfill the following requirements:

Technically:


Method Summary
 java.lang.String getExecutionHistory()
          Returns the execution history of the task.
 java.lang.String getId()
          Gets the tasks unique id.
 boolean isFinished()
          Indicates that the task is finished.
 void setExecutionHistory(java.lang.String msg)
          Sets the tasks execution history.
 void setId(java.lang.String setId)
          Sets the tasks id.
 void takeOneStep()
          Executes one step of the task.
 java.lang.String toStateString()
          Should produce some info about the task and its current state.
 

Method Detail

setId

void setId(java.lang.String setId)
Sets the tasks id.

Parameters:
setId - Unique id.

getId

java.lang.String getId()
Gets the tasks unique id.

Returns:
The id.

setExecutionHistory

void setExecutionHistory(java.lang.String msg)
Sets the tasks execution history. Typically this method is used by the client to inform the vendor what happend during execution. If an exception occures dureing execution the vendor finds the execution stack here.

Parameters:
msg - The message to be reported.

getExecutionHistory

java.lang.String getExecutionHistory()
Returns the execution history of the task.

Returns:
The execution history.

takeOneStep

void takeOneStep()
                 throws java.lang.Exception
Executes one step of the task. Execution of this method should bring the task closer to termination.

Throws:
java.lang.Exception

isFinished

boolean isFinished()
Indicates that the task is finished. A task must finish after a finite amount of steps.

Returns:
True if the task is finished.

toStateString

java.lang.String toStateString()
Should produce some info about the task and its current state. Is used in the client GUI.

Returns:
A string containing a description of the state of task.


vgrid the vienna grid project