vgrid.task
Class NullTask

java.lang.Object
  extended by vgrid.task.NullTask
All Implemented Interfaces:
java.io.Serializable, Task

public class NullTask
extends java.lang.Object
implements Task

A task that does nothing on the client but to sleep for a certain amount of time. It gets deployed by the server if no other tasks are avaylable. The client creates its own NullTask if it cannot become a task from the server.

See Also:
Serialized Form

Field Summary
static java.lang.String ID
           
 
Constructor Summary
NullTask()
           
NullTask(java.lang.String description, int timeout)
           
 
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 setId)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final java.lang.String ID
See Also:
Constant Field Values
Constructor Detail

NullTask

public NullTask()

NullTask

public NullTask(java.lang.String description,
                int timeout)
Method Detail

setId

public void setId(java.lang.String setId)
Description copied from interface: Task
Sets the tasks id.

Specified by:
setId in interface Task
Parameters:
setId - Unique id.

getId

public java.lang.String getId()
Description copied from interface: Task
Gets the tasks unique id.

Specified by:
getId in interface Task
Returns:
The id.

takeOneStep

public void takeOneStep()
Description copied from interface: Task
Executes one step of the task. Execution of this method should bring the task closer to termination.

Specified by:
takeOneStep in interface Task

isFinished

public boolean isFinished()
Description copied from interface: Task
Indicates that the task is finished. A task must finish after a finite amount of steps.

Specified by:
isFinished in interface Task
Returns:
True if the task is finished.

toStateString

public java.lang.String toStateString()
Description copied from interface: Task
Should produce some info about the task and its current state. Is used in the client GUI.

Specified by:
toStateString in interface Task
Returns:
A string containing a description of the state of task.

getExecutionHistory

public java.lang.String getExecutionHistory()
Description copied from interface: Task
Returns the execution history of the task.

Specified by:
getExecutionHistory in interface Task
Returns:
The execution history.

setExecutionHistory

public void setExecutionHistory(java.lang.String setId)
Description copied from interface: Task
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.

Specified by:
setExecutionHistory in interface Task
Parameters:
setId - The message to be reported.


vgrid the vienna grid project