Next version of JABA
[jabaws.git] / engine / compbio / engine / client / ConfiguredExecutable.java
1 /* Copyright (c) 2009 Peter Troshin\r
2  *  \r
3  *  JAva Bioinformatics Analysis Web Services (JABAWS) @version: 1.0     \r
4  * \r
5  *  This library is free software; you can redistribute it and/or modify it under the terms of the\r
6  *  Apache License version 2 as published by the Apache Software Foundation\r
7  * \r
8  *  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without\r
9  *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache \r
10  *  License for more details.\r
11  * \r
12  *  A copy of the license is in apache_license.txt. It is also available here:\r
13  * @see: http://www.apache.org/licenses/LICENSE-2.0.txt\r
14  * \r
15  * Any republication or derived work distributed in source code form\r
16  * must include this copyright and license notice.\r
17  */\r
18 \r
19 package compbio.engine.client;\r
20 \r
21 import java.io.IOException;\r
22 import java.io.InputStream;\r
23 import java.util.Map;\r
24 \r
25 import compbio.metadata.JobExecutionException;\r
26 import compbio.metadata.JobSubmissionException;\r
27 import compbio.metadata.ResultNotAvailableException;\r
28 \r
29 public interface ConfiguredExecutable<T> extends Executable<T>,\r
30                 PipedExecutable<T> {\r
31 \r
32         Map<String, String> getEnvironment();\r
33 \r
34         String getTaskId();\r
35 \r
36         String getCommand(ExecProvider provider) throws JobSubmissionException;\r
37 \r
38         ExecProvider getSupportedRuntimes();\r
39 \r
40         String getWorkDirectory();\r
41 \r
42         void setWorkDirectory(String workDirectory);\r
43 \r
44         <V> V getResults() throws ResultNotAvailableException;\r
45 \r
46         Executable<T> getExecutable();\r
47 \r
48         CommandBuilder<T> getParameters();\r
49 \r
50         boolean saveRunConfiguration() throws IOException;\r
51 \r
52         ConfiguredExecutable<?> loadRunConfiguration(InputStream input)\r
53                         throws IOException;\r
54 \r
55         public ExecProvider getExecProvider();\r
56 \r
57 }\r