1 |
2960
|
antonis.le
|
package gr.uoa.di.driver.util;
|
2 |
|
|
|
3 |
|
|
import eu.dnetlib.api.DriverService;
|
4 |
|
|
|
5 |
|
|
/**
|
6 |
|
|
* A factory to create service locators.
|
7 |
|
|
*
|
8 |
|
|
* @author <a href="mailto:antleb@di.uoa.gr">Antonis Lempesis</a>
|
9 |
|
|
*
|
10 |
|
|
*/
|
11 |
|
|
public interface ServiceLocatorFactory {
|
12 |
|
|
|
13 |
|
|
/**
|
14 |
|
|
* Creates a dynamic service locator.
|
15 |
|
|
*
|
16 |
|
|
* @param <S> the service type.
|
17 |
|
|
* @param serviceClass the service class.
|
18 |
|
|
* @return A service locator for services of type S.
|
19 |
|
|
*/
|
20 |
|
|
public <S extends DriverService> ServiceLocator<S> newServiceLocator(
|
21 |
|
|
Class<S> serviceClass);
|
22 |
|
|
|
23 |
|
|
/**
|
24 |
|
|
* Creates a service locator. It can be either static (if serviceUrl != null)
|
25 |
|
|
* or dynamic.
|
26 |
|
|
*
|
27 |
|
|
* @param <S> the service type.
|
28 |
|
|
* @param serviceClass the service class.
|
29 |
|
|
* @param serviceUrl The service URL.
|
30 |
|
|
* @return A service locator for services of type S.
|
31 |
|
|
*/
|
32 |
|
|
public <S extends DriverService> ServiceLocator<S> newServiceLocator(
|
33 |
|
|
Class<S> serviceClass, String serviceUrl);
|
34 |
|
|
}
|