- compbio.runner.Util.writeInput(sequences, confExec);\r
- AsyncExecutor engine = Configurator.getAsyncEngine(confExec);\r
- String jobId = engine.submitJob(confExec);\r
- if (logger != null) {\r
- logger.log(timer, callingMethod, jobId);\r
+\r
+ public static <T> String align(List<FastaSequence> sequences,\r
+ ConfiguredExecutable<T> confExec, WSLogger logger,\r
+ String callingMethod, Limit<T> limit)\r
+ throws LimitExceededException, JobSubmissionException {\r
+ Timer timer = Timer.getMilliSecondsTimer();\r
+ if (limit != null && limit.isExceeded(sequences)) {\r
+ throw LimitExceededException.newLimitExceeded(limit, sequences);\r
+ }\r
+ compbio.runner.Util.writeInput(sequences, confExec);\r
+ AsyncExecutor engine = Configurator.getAsyncEngine(confExec);\r
+ String jobId = engine.submitJob(confExec);\r
+ if (logger != null) {\r
+ logger.log(timer, callingMethod, jobId);\r
+ }\r
+ return jobId;\r