Next version of JABA
[jabaws.git] / engine / compbio / engine / client / Executable.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.util.List;\r
22 \r
23 import compbio.metadata.Limit;\r
24 import compbio.metadata.LimitsManager;\r
25 import compbio.metadata.ResultNotAvailableException;\r
26 \r
27 /**\r
28  * Interface to a native executable.\r
29  * \r
30  * @author pvtroshin\r
31  * \r
32  * @param <T>\r
33  */\r
34 public interface Executable<T> {\r
35 \r
36         enum ExecProvider {\r
37                 Local, Cluster, Any\r
38         };\r
39 \r
40         /**\r
41          * Adds parameter to the list of parameters for a native executable\r
42          * \r
43          * @param parameters\r
44          * @return this Executable\r
45          */\r
46         Executable<T> addParameters(List<String> parameters);\r
47 \r
48         List<String> getCreatedFiles();\r
49 \r
50         String getInput();\r
51 \r
52         String getOutput();\r
53 \r
54         String getError();\r
55 \r
56         CommandBuilder<T> getParameters(ExecProvider provider);\r
57 \r
58         <V> V getResults(String directory) throws ResultNotAvailableException;\r
59 \r
60         Executable<?> loadRunConfiguration(RunConfiguration rconfig);\r
61 \r
62         Limit<T> getLimit(String presetName);\r
63 \r
64         LimitsManager<T> getLimits();\r
65 \r
66 }\r