org.jppf.client
Class SubmissionManager

java.lang.Object
  extended by org.jppf.utils.ThreadSynchronization
      extended by org.jppf.client.SubmissionManager
All Implemented Interfaces:
Runnable

public class SubmissionManager
extends ThreadSynchronization
implements Runnable

This task provides asynchronous management of tasks submitted through the resource adapter. It relies on a queue where job are first added, then submitted when a driver connection becomes available. It also provides methods to check the status of a submission and retrieve the results.

Author:
Laurent Cohen

Field Summary
 
Fields inherited from class org.jppf.utils.ThreadSynchronization
stopped
 
Constructor Summary
SubmissionManager(JPPFClient client)
          Initialize this submission manager with the specified JPPF client.
 
Method Summary
 String resubmitJob(JPPFJob job)
          Add an existing submission back into the execution queue.
 void run()
          Run the loop of this submission manager, watching for the queue and starting a job when the queue has one and a connnection is available.
 String submitJob(JPPFJob job)
          Add a task submission to the execution queue.
 
Methods inherited from class org.jppf.utils.ThreadSynchronization
goToSleep, goToSleep, goToSleep, isStopped, setStopped, wakeUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubmissionManager

public SubmissionManager(JPPFClient client)
Initialize this submission manager with the specified JPPF client.

Parameters:
client - the JPPF client that manages connections to the JPPF drivers. JPPF submissions.
Method Detail

run

public void run()
Run the loop of this submission manager, watching for the queue and starting a job when the queue has one and a connnection is available.

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

submitJob

public String submitJob(JPPFJob job)
Add a task submission to the execution queue.

Parameters:
job - encapsulation of the execution data.
Returns:
the unique id of the submission.

resubmitJob

public String resubmitJob(JPPFJob job)
Add an existing submission back into the execution queue.

Parameters:
job - encapsulation of the execution data.
Returns:
the unique id of the submission.


Copyright © 2005-2010 JPPF Team.