sdt.net
Class Job

java.lang.Object
  |
  +--sdt.net.Job

public class Job
extends java.lang.Object

This class implements "job" objects which are placed in the "pool of tasks". The class acts as a container for both the input task (Task and the result of the evaluation (Result.java).

See Also:
Pool, Task, sd.net.Result

Constructor Summary
Job(Task task_input, Result result, java.lang.String job_name, java.lang.String result_name)
          A Job is instantiated by specifying the input task, expected result and their fully qualified class names.
 
Method Summary
protected  void finalize()
          For garbage collection
 Task getInput()
          returns the input task
 java.lang.Object getOutput()
          returns the result of the evaluation.
protected  java.lang.String getResultName()
          returns the class name of the result object
protected  java.lang.String getTaskName()
          returns the class name of the input task
 void putOutput(Result job_output, java.lang.String job_server)
          This method sets the result of the evaluation and notifies the methods which are blocking for the evaluation to complete.
 boolean ready()
          returns if the task evaluation is complete or not.
 void setOutput(Result job_output)
          sets the result of the evaluation
 java.lang.String toString()
          Returns a string representation of the job
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Job

public Job(Task task_input,
           Result result,
           java.lang.String job_name,
           java.lang.String result_name)
A Job is instantiated by specifying the input task, expected result and their fully qualified class names.
Method Detail

getTaskName

protected java.lang.String getTaskName()
returns the class name of the input task

getResultName

protected java.lang.String getResultName()
returns the class name of the result object

ready

public boolean ready()
returns if the task evaluation is complete or not.

getInput

public Task getInput()
returns the input task

getOutput

public java.lang.Object getOutput()
returns the result of the evaluation. This method blocks if the evaluation is not complete.

setOutput

public void setOutput(Result job_output)
sets the result of the evaluation

putOutput

public void putOutput(Result job_output,
                      java.lang.String job_server)
This method sets the result of the evaluation and notifies the methods which are blocking for the evaluation to complete.

toString

public java.lang.String toString()
Returns a string representation of the job
Overrides:
toString in class java.lang.Object

finalize

protected void finalize()
                 throws java.lang.Throwable
For garbage collection
Overrides:
finalize in class java.lang.Object