edu.wpi.prc.server.spotcheck
Class SpotCheckGenerator
java.lang.Object
edu.wpi.prc.server.spotcheck.SpotCheckGenerator
- All Implemented Interfaces:
- java.util.concurrent.Callable<Result>
public class SpotCheckGenerator
- extends java.lang.Object
- implements java.util.concurrent.Callable<Result>
Invokes the project's science application to compute the result of a work unit.
- Author:
- James Baldassari
Method Summary |
Result |
call()
Sends the work unit to the science application, receives the result for that work unit,
and makes it available to the SpotCheckThread through the Callable interface. |
private Result |
invokeScienceApp()
Runs the science application, then passes it a work unit to compute
and waits for the science application to return a result. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SCIAPP_RETRY_DELAY
private static final int SCIAPP_RETRY_DELAY
- See Also:
- Constant Field Values
STARTUP_DELAY
private static final int STARTUP_DELAY
- See Also:
- Constant Field Values
wu
private WorkUnit wu
xmlrpcClient
private org.apache.xmlrpc.XmlRpcClient xmlrpcClient
SpotCheckGenerator
public SpotCheckGenerator(WorkUnit wu,
org.apache.xmlrpc.XmlRpcClient xmlrpcClient)
- Default constructor.
- Parameters:
wu
- The work unit for which to compute a result.
call
public Result call()
- Sends the work unit to the science application, receives the result for that work unit,
and makes it available to the SpotCheckThread through the Callable interface.
- Specified by:
call
in interface java.util.concurrent.Callable<Result>
- Returns:
- The result computed for wu.
invokeScienceApp
private Result invokeScienceApp()
- Runs the science application, then passes it a work unit to compute
and waits for the science application to return a result.
- Returns:
- Returns the result computed by the science application.