Class ServiceFinder
- java.lang.Object
-
- ch.systemsx.cisd.openbis.common.api.client.ServiceFinder
-
public class ServiceFinder extends java.lang.Object
Helper to find a remote service exported by Spring's HttpInvoker or any other way for which an implementation ofIServiceStubFactory
exists. Default isHttpInvokerBasedServiceStubFactory
.
-
-
Field Summary
Fields Modifier and Type Field Description static int
SERVER_TIMEOUT_IN_MINUTES
-
Constructor Summary
Constructors Constructor Description ServiceFinder(java.lang.String applicationName, java.lang.String urlServiceSuffix)
Creates an instance for specified application name and URL service suffix.ServiceFinder(java.lang.String applicationName, java.lang.String urlServiceSuffix, IServiceStubFactory serviceStubCreator)
Creates an instance for specified application name and URL service suffix.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <S extends IRpcService>
ScreateService(java.lang.Class<S> serviceInterface, java.lang.String serverUrl)
Creates a remote service implementing specified interface for specified server URL.<S extends IRpcService>
ScreateService(java.lang.Class<S> serviceInterface, java.lang.String serverUrl, long timeoutInMillis)
Creates a remote service implementing specified interface for specified server URL.<S> S
createService(java.lang.Class<S> serviceInterface, java.lang.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> S
createService(java.lang.Class<S> serviceInterface, java.lang.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> java.lang.String
createServiceUrl(java.lang.Class<S> serviceInterface, java.lang.String serverUrl, IServicePinger<S> servicePinger, long timeoutInMillis)
-
-
-
Field Detail
-
SERVER_TIMEOUT_IN_MINUTES
public static final int SERVER_TIMEOUT_IN_MINUTES
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ServiceFinder
public ServiceFinder(java.lang.String applicationName, java.lang.String urlServiceSuffix)
Creates an instance for specified application name and URL service suffix. UsesHttpInvokerBasedServiceStubFactory
to create the service stub.- Parameters:
applicationName
- Name of the Web application.urlServiceSuffix
- URL Suffix of the service.
-
ServiceFinder
public ServiceFinder(java.lang.String applicationName, java.lang.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 Detail
-
createService
public <S extends IRpcService> S createService(java.lang.Class<S> serviceInterface, java.lang.String serverUrl)
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(java.lang.Class<S> serviceInterface, java.lang.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(java.lang.Class<S> serviceInterface, java.lang.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(java.lang.Class<S> serviceInterface, java.lang.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> java.lang.String createServiceUrl(java.lang.Class<S> serviceInterface, java.lang.String serverUrl, IServicePinger<S> servicePinger, long timeoutInMillis)
-
-