/**
* Generic properties for Web Service Client threads.
*/
+ /**
+ * view that this job was associated with
+ */
AlignmentI currentView = null;
+ /**
+ * feature settings from view that job was associated with
+ */
FeatureRendererSettings featureSettings = null;
+ /**
+ * metadata about this web service
+ */
WebserviceInfo wsInfo = null;
+ /**
+ * original input data for this job
+ */
AlignmentView input = null;
+ /**
+ * dataset sequence relationships to be propagated onto new results
+ */
AlignedCodonFrame[] codonframe = null;
+ /**
+ * are there jobs still running in this thread.
+ */
boolean jobComplete = false;
abstract class WSJob
*/
int jobnum = 0; // WebServiceInfo pane for this job
String jobId; // ws job ticket
+ /**
+ * has job been cancelled
+ */
boolean cancelled = false;
- int allowedServerExceptions = 3; // job dies if too many exceptions.
+ /**
+ * number of exceptions left before job dies
+ */
+ int allowedServerExceptions = 3;
+ /**
+ * has job been submitted
+ */
boolean submitted = false;
+ /**
+ * are all sub-jobs complete
+ */
boolean subjobComplete = false;
/**
*
*/
abstract boolean hasValidInput();
+ /**
+ * The last result object returned by the service.
+ */
vamsas.objects.simple.Result result;
}
class JobStateSummary
{
+ /**
+ * number of jobs running
+ */
int running = 0;
+ /**
+ * number of jobs queued
+ */
int queuing = 0;
+ /**
+ * number of jobs finished
+ */
int finished = 0;
+ /**
+ * number of jobs failed
+ */
int error = 0;
+ /**
+ * number of jobs stopped due to server error
+ */
int serror = 0;
+ /**
+ * number of jobs cancelled
+ */
int cancelled = 0;
+ /**
+ * number of jobs finished with results
+ */
int results = 0;
+ /**
+ * processes WSJob and updates job status counters and WebService status displays
+ * @param wsInfo
+ * @param OutputHeader
+ * @param j
+ */
void updateJobPanelState(WebserviceInfo wsInfo, String OutputHeader,
WSJob j)
{
}
}
}
-
+ /**
+ * one or more jobs being managed by this thread.
+ */
WSJob jobs[] = null;
+ /**
+ * full name of service
+ */
String WebServiceName = null;
String OutputHeader;
String WsUrl = null;
+ /**
+ * query web service for status of job.
+ * on return, job.result must not be null - if it is then it will be
+ * assumed that the job status query timed out and a server exception
+ * will be logged.
+ * @param job
+ * @throws Exception will be logged as a server exception for this job
+ */
abstract void pollJob(WSJob job)
throws Exception;
else
{
Cache.log.debug("WebServiceJob poll loop finished with no jobs created.");
+ wsInfo.setFinishedNoResults();
}
}
+ /**
+ * submit job to web service
+ * @param job
+ */
abstract void StartJob(WSJob job);
+ /**
+ * process the set of WSJob objects into a set of results, and tidy up.
+ */
abstract void parseResult();
+ /**
+ * helper function to conserve dataset references to sequence objects returned from web services
+ * 1. Propagates AlCodonFrame data from <code>codonframe</code> to <code>al</code>
+ * @param al
+ */
protected void propagateDatasetMappings(Alignment al)
{
if (codonframe!=null)