Lightweight Bartering Grid

lbg.peer.workflow
Class TaskDescriptor

java.lang.Object
  extended by lbg.peer.workflow.TaskDescriptor
All Implemented Interfaces:
java.io.Serializable

public class TaskDescriptor
extends java.lang.Object
implements java.io.Serializable

Contains information relative to the creation of the Task : names of the classes, name of the class containing the running routines, input parameters and input data or ways to access it.

Author:
Xavier Dalem
See Also:
JobDescriptor, Serialized Form

Constructor Summary
TaskDescriptor(java.lang.String[] related_classes, java.lang.String main_class, java.lang.Object[] params, java.lang.String[] related_datas)
          Create a task description
 
Method Summary
 java.lang.String[] getClassNames()
          Get all classes needed by the wannabe Task
 java.lang.String[] getDataIDs()
          Return all data options for all data's this TaskDescriptor depends on.
 java.lang.String getMainClass()
           
 java.lang.Object[] getParams()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TaskDescriptor

public TaskDescriptor(java.lang.String[] related_classes,
                      java.lang.String main_class,
                      java.lang.Object[] params,
                      java.lang.String[] related_datas)
               throws GridException
Create a task description

Warning: for efficiency reasons, we cannot afford to make copies of the possibly enormous parameter arrays. Make sure you don't modify it later.

Parameters:
related_classes - Names of all classes required for this task and whose bytecodes are kept in the parent JobDescriptor
main_class - The name of the class implementing GridApplication
params - Parameters for the task. Should at least be an empty array
related_datas - IDs of the input data's passed to the task
Throws:
GridException
Method Detail

getClassNames

public java.lang.String[] getClassNames()
Get all classes needed by the wannabe Task


getMainClass

public java.lang.String getMainClass()

getParams

public java.lang.Object[] getParams()

getDataIDs

public java.lang.String[] getDataIDs()
Return all data options for all data's this TaskDescriptor depends on.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Lightweight Bartering Grid

Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.