Revision 36527
Added by Alessia Bardi over 9 years ago
modules/cnr-service-common/trunk/src/main/java/eu/dnetlib/enabling/tools/ServiceLocator.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.enabling.tools; |
2 | 2 |
|
3 |
|
|
3 | 4 |
/** |
4 | 5 |
* A service locator provides a reference to a, possibly remote, service. |
5 | 6 |
* |
... | ... | |
7 | 8 |
* |
8 | 9 |
* @param <T> |
9 | 10 |
* the type of the service to return |
11 |
* @deprecated As of release 2.0.0, use instead {@link UniqueServiceLocator.getIsLookupService()} |
|
10 | 12 |
*/ |
11 | 13 |
@Deprecated |
12 | 14 |
public interface ServiceLocator<T> { |
15 |
|
|
13 | 16 |
/** |
14 | 17 |
* locate and return a service of this type. |
15 | 18 |
* |
16 | 19 |
* @return a service client instance |
17 | 20 |
*/ |
18 | 21 |
T getService(); |
19 |
|
|
22 |
|
|
20 | 23 |
/** |
21 | 24 |
* Locate using a profileID (service or datastructure) the service of this type. |
22 |
*
|
|
25 |
* |
|
23 | 26 |
* @param profileId |
24 | 27 |
* @param clazz |
25 | 28 |
* @return a service client instance |
26 | 29 |
*/ |
27 |
T getService(String profileId, Class<T> clazz);
|
|
30 |
T getService(final String profileId, final Class<T> clazz);
|
|
28 | 31 |
|
29 | 32 |
/** |
30 | 33 |
* locate and return a service ID. |
... | ... | |
32 | 35 |
* @return a service ID |
33 | 36 |
*/ |
34 | 37 |
String getServiceId(); |
35 |
|
|
38 |
|
|
36 | 39 |
/** |
37 | 40 |
* locate and return a service ID. |
38 | 41 |
* |
39 |
* @param profileId (the id of the service or the id of one of its datastructures) |
|
42 |
* @param profileId |
|
43 |
* (the id of the service or the id of one of its datastructures) |
|
40 | 44 |
* @return a service ID. |
41 | 45 |
*/ |
42 |
String getServiceId(String profileId); |
|
46 |
String getServiceId(final String profileId);
|
|
43 | 47 |
|
44 | 48 |
} |
Also available in: Unified diff
added deprecation javadoc