Class ServiceFinder
java.lang.Object
ch.systemsx.cisd.openbis.common.api.client.ServiceFinder
Helper to find a remote service exported by Spring's HttpInvoker or any other way for which
an implementation of
IServiceStubFactory exists. Default is HttpInvokerBasedServiceStubFactory.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionServiceFinder(String applicationName, String urlServiceSuffix) Creates an instance for specified application name and URL service suffix.ServiceFinder(String applicationName, String urlServiceSuffix, IServiceStubFactory serviceStubCreator) Creates an instance for specified application name and URL service suffix. -
Method Summary
Modifier and TypeMethodDescription<S extends IRpcService>
ScreateService(Class<S> serviceInterface, String serverUrl) Creates a remote service implementing specified interface for specified server URL.<S extends IRpcService>
ScreateService(Class<S> serviceInterface, String serverUrl, long timeoutInMillis) Creates a remote service implementing specified interface for specified server URL.<S> ScreateService(Class<S> serviceInterface, String serverUrl, IServicePinger<S> servicePinger) Creates a remote service implementing specified interface for specified server URL by using specified pinger for checking server connection.<S> ScreateService(Class<S> serviceInterface, String serverUrl, IServicePinger<S> servicePinger, long timeoutInMillis) Creates a remote service implementing specified interface for specified server URL by using specified pinger for checking server connection.<S> StringcreateServiceUrl(Class<S> serviceInterface, String serverUrl, IServicePinger<S> servicePinger, long timeoutInMillis)
-
Field Details
-
SERVER_TIMEOUT_IN_MINUTES
public static final int SERVER_TIMEOUT_IN_MINUTES- See Also:
-
-
Constructor Details
-
ServiceFinder
Creates an instance for specified application name and URL service suffix. UsesHttpInvokerBasedServiceStubFactoryto create the service stub.- Parameters:
applicationName- Name of the Web application.urlServiceSuffix- URL Suffix of the service.
-
ServiceFinder
public ServiceFinder(String applicationName, String urlServiceSuffix, IServiceStubFactory serviceStubCreator) Creates an instance for specified application name and URL service suffix.- Parameters:
applicationName- Name of the Web application.urlServiceSuffix- URL Suffix of the service.serviceStubCreator- Factory which creates the service stub
-
-
Method Details
-
createService
Creates a remote service implementing specified interface for specified server URL. Following server URLs are accepted:- protocol://host:port
- protocol://host:port/applicationName
- protocol://host:port/applicationName/applicationName
-
createService
public <S extends IRpcService> S createService(Class<S> serviceInterface, String serverUrl, long timeoutInMillis) Creates a remote service implementing specified interface for specified server URL. Following server URLs are accepted:- protocol://host:port
- protocol://host:port/applicationName
- protocol://host:port/applicationName/applicationName
-
createService
public <S> S createService(Class<S> serviceInterface, String serverUrl, IServicePinger<S> servicePinger) Creates a remote service implementing specified interface for specified server URL by using specified pinger for checking server connection. Following server URLs are accepted:- protocol://host:port
- protocol://host:port/applicationName
- protocol://host:port/applicationName/applicationName
-
createService
public <S> S createService(Class<S> serviceInterface, String serverUrl, IServicePinger<S> servicePinger, long timeoutInMillis) Creates a remote service implementing specified interface for specified server URL by using specified pinger for checking server connection. Following server URLs are accepted:- protocol://host:port
- protocol://host:port/applicationName
- protocol://host:port/applicationName/applicationName
-
createServiceUrl
public <S> String createServiceUrl(Class<S> serviceInterface, String serverUrl, IServicePinger<S> servicePinger, long timeoutInMillis)
-