71a25194370e85baea728a09b3ba15abdfc58661
[jabaws.git] / webservices / compbio / data / msa / RegistryWS.java
1 /* Copyright (c) 2011 Peter Troshin\r
2  *  \r
3  *  JAva Bioinformatics Analysis Web Services (JABAWS) @version: 2.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 package compbio.data.msa;\r
19 \r
20 import java.util.Date;\r
21 import java.util.Set;\r
22 \r
23 import javax.jws.WebService;\r
24 \r
25 import compbio.ws.client.Services;\r
26 import compbio.ws.server.Category;\r
27 \r
28 /**\r
29  * JABAWS services registry\r
30  * \r
31  * @author pvtroshin\r
32  * @version 1.0 June 2011\r
33  */\r
34 @WebService(targetNamespace = JABAService.V2_SERVICE_NAMESPACE)\r
35 public interface RegistryWS extends JABAService {\r
36 \r
37         /**\r
38          * List of services that are functioning on the server. This function\r
39          * returns the results of testing performed some time ago by\r
40          * {@link #testAllServices} or {@link #testService(Services)} methods. The\r
41          * time of last check can be obtained from\r
42          * {@link #getLastTestedOn(Services)} method\r
43          * \r
44          * @return the Set of Services which are functioning on the server\r
45          * @see #testAllServices()\r
46          */\r
47         Set<Services> getSupportedServices();\r
48         /**\r
49          * Number of seconds since the last test. Returns 0 if the service was not\r
50          * tested or tested less then a one second ago.\r
51          * \r
52          * @param service\r
53          * @return when last time tested\r
54          */\r
55         int getLastTested(Services service);\r
56         /**\r
57          * The date and time the service has been verified to work last time\r
58          * \r
59          * @param service\r
60          * @return the Date and time on which the service was last tested\r
61          */\r
62         Date getLastTestedOn(Services service);\r
63         /**\r
64          * Test all JABAWS services on the server\r
65          * \r
66          * @return the test log\r
67          */\r
68         String testAllServices();\r
69         /**\r
70          * Test a particular service\r
71          * \r
72          * @param service\r
73          * @return the testing log\r
74          */\r
75         String testService(Services service);\r
76         /**\r
77          * Check whether a particular web service is working on this server\r
78          * \r
79          * @param service\r
80          * @return true if the service was functioning in time of last testing.\r
81          */\r
82         boolean isOperating(Services service);\r
83 \r
84         /**\r
85          * Gives the description of the service.\r
86          * \r
87          * @param service\r
88          * @return String, plain text or html formatted piece, but NOT a full html\r
89          *         document\r
90          */\r
91         String getServiceDescription(Services service);\r
92 \r
93         /**\r
94          * Gets the list of services per category. ServiceClassifier has the method\r
95          * that returns Map<Category, Set<Services>>\r
96          * \r
97          * @return ServiceClassifier the object to represent relation between\r
98          *         Services and Categories\r
99          */\r
100         Set<Category> getServiceCategories();\r
101 \r
102 }\r