Class ClientSideServiceProvider
java.lang.Object
net.bluemind.core.rest.http.ClientSideServiceProvider
- All Implemented Interfaces:
net.bluemind.core.rest.IServiceProvider
public class ClientSideServiceProvider
extends Object
implements net.bluemind.core.rest.IServiceProvider
Calls the BlueMind API over HTTP, from the Java API client jars.
It keeps the API of the ClientSideServiceProvider of the BlueMind
servers, on top of JdkClientServiceProvider. Like the server one, it
accepts any TLS certificate. The read timeout has no equivalent and is not
used.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionstatic ClientSideServiceProvidergetProvider(String base, String apiKey) Returns a provider with 40 seconds timeouts.static ClientSideServiceProvidergetProvider(String base, String apiKey, int connectTimeoutSeconds, int readTimeoutSeconds, int requestTimeoutSeconds) Returns a provider with the given timeouts.<T,A> A Returns an asynchronous client of a service.<T> Tnet.bluemind.core.rest.IServiceProviderwithRemoteIps(List<String> remotes)
-
Field Details
-
TIMEOUT_LONG_REQUEST
public static final int TIMEOUT_LONG_REQUEST -
TIMEOUT_INFINITE_REQUEST
public static final int TIMEOUT_INFINITE_REQUEST- See Also:
-
-
Method Details
-
getProvider
Returns a provider with 40 seconds timeouts.- Parameters:
base- URL of the BlueMind server (eg. https://bluemind.example.com)apiKey- API key or session id sent with each call- Returns:
- the provider
-
getProvider
public static ClientSideServiceProvider getProvider(String base, String apiKey, int connectTimeoutSeconds, int readTimeoutSeconds, int requestTimeoutSeconds) Returns a provider with the given timeouts.- Parameters:
base- URL of the BlueMind server (eg. https://bluemind.example.com)apiKey- API key or session id sent with each callconnectTimeoutSeconds- maximum time to open a connectionreadTimeoutSeconds- not usedrequestTimeoutSeconds- maximum time to wait for the response headers of a call,TIMEOUT_INFINITE_REQUESTfor no limit- Returns:
- the provider
-
instance
-
instance
Returns an asynchronous client of a service.- Parameters:
interfaceClass- service interface (eg. IUser)asyncInterface- asynchronous variant of the service interface (eg. IUserAsync)params- parameters of the root path of the service- Returns:
- the asynchronous client
-
withRemoteIps
-
setOrigin
- Specified by:
setOriginin interfacenet.bluemind.core.rest.IServiceProvider
-