org.jppf.client
Class JobSubmission

java.lang.Object
  extended by org.jppf.client.JobSubmission
All Implemented Interfaces:
Runnable

public class JobSubmission
extends Object
implements Runnable

This class encapsulates the results of a job submission.

Author:
Laurent Cohen

Field Summary
protected  AbstractJPPFClientConnection connection
          The connection to execute the job on.
protected  JPPFJob job
          The submitted job.
protected  boolean locallyExecuting
          Flag indicating whether the job will be executed locally, at least partially.
protected  SubmissionStatus status
          The status of this submission.
protected  SubmissionManager submissionManager
          The submission manager.
 
Method Summary
 AbstractJPPFClientConnection getConnection()
          Get the connection to execute the job on.
 String getId()
          Get the unique id of this submission.
 JPPFJob getJob()
          Get the submitted job.
 SubmissionStatus getStatus()
          Get the status of this submission.
 boolean isLocallyExecuting()
          Determine whether the job will be executed locally, at least partially.
 void run()
          This method executes until all partial results have been received.
 void setConnection(AbstractJPPFClientConnection connection)
          Set the connection to execute the job on.
 void setStatus(SubmissionStatus status)
          Set the status of this submission.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

status

protected SubmissionStatus status
The status of this submission.


job

protected JPPFJob job
The submitted job.


connection

protected AbstractJPPFClientConnection connection
The connection to execute the job on.


submissionManager

protected SubmissionManager submissionManager
The submission manager.


locallyExecuting

protected final boolean locallyExecuting
Flag indicating whether the job will be executed locally, at least partially.

Method Detail

run

public void run()
This method executes until all partial results have been received.

Specified by:
run in interface Runnable
See Also:
Runnable.run()

getStatus

public SubmissionStatus getStatus()
Get the status of this submission.

Returns:
a SubmissionStatus enumerated value.

setStatus

public void setStatus(SubmissionStatus status)
Set the status of this submission.

Parameters:
status - a SubmissionStatus enumerated value.

getId

public String getId()
Get the unique id of this submission.

Returns:
the id as a string.

getJob

public JPPFJob getJob()
Get the submitted job.

Returns:
a JPPFJob instance.

getConnection

public AbstractJPPFClientConnection getConnection()
Get the connection to execute the job on.

Returns:
a AbstractJPPFClientConnection instance.

setConnection

public void setConnection(AbstractJPPFClientConnection connection)
Set the connection to execute the job on.

Parameters:
connection - a AbstractJPPFClientConnection instance.

isLocallyExecuting

public boolean isLocallyExecuting()
Determine whether the job will be executed locally, at least partially.

Returns:
true if the job is executed locally, false otherwise.


Copyright © 2005-2010 JPPF Team.