public class CloudConnector extends Connector
This class acts as a facade to the connector library. All requests to the eSales service are initiated by method calls to a CloudConnector object, or an object obtained via the CloudConnector.
Use the getOrCreate(String)
or get(String)
method to obtain a CloudConnector object.
Connector.ConnectorKey
Modifier and Type | Method | Description |
---|---|---|
static CloudConnector |
get(String uri) |
Gets a connector, provided an eSales cluster URI.
|
static CloudConnector |
get(String uri,
ExecutorService asyncTaskExecutor) |
Gets a connector, provided an eSales cluster URI.
|
static CloudConnector |
getOrCreate(String uriString) |
Creates a connector, unless already created, provided an eSales cluster URI.
|
static CloudConnector |
getOrCreate(String uriString,
ExecutorService asyncTaskExecutor) |
Creates a connector, unless already created, provided an eSales cluster URI.
|
availableMarkets, checkCustomerDataJobStatus, createExportCustomerDataJob, createRemoveCustomerDataJob, downloadExportCustomerDataJobResult, downloadExportCustomerDataJobResult, exportAds, exportAds, exportConfiguration, exportConfiguration, exportPanels, exportPanels, exportProducts, exportProducts, exportProducts, exportSynonyms, exportSynonyms, getVersion, importAds, importAds, importConfiguration, importConfiguration, importFile, importPanels, importPanels, importProducts, importProducts, importSynonyms, importSynonyms, latestNotifications, latestNotifications, putStrings, reporter, reporterForUnknownMarket, save, serverLog, serverLogNames, session, session, status
public static CloudConnector get(String uri)
get(String, ExecutorService)
with the asyncTaskExecutor set to ForkJoinPool.commonPool().
See the getOrCreate(String)
for details on the URI format.
uri
- The base URI to an eSales cluster.public static CloudConnector get(String uri, ExecutorService asyncTaskExecutor)
See the getOrCreate(String, ExecutorService)
for details on the URI format.
uri
- The base URI to an eSales cluster.asyncTaskExecutor
- executor to be used for non-blocking health-check requests. Set to null if you want
to have blocking behaviour.public static CloudConnector getOrCreate(String uriString) throws MalformedURLException
uriString
already exists but has an executor service associated.
(getOrCreate(String, ExecutorService)
)
Equivalent of calling getOrCreate(String, ExecutorService)
with the asyncTaskExecutor set to ForkJoinPool.commonPool().
To disable non-blocking behaviour, call getOrCreate(String, ExecutorService)
with asyncTaskExecutor set to null.
The URI should be on the following format: esales://username:password[@host[:port][;...]][?parameter1=value1[¶meter2=value2[&...]]]
Example 1: esales://john:doe
Example 2: esales://john:doe?query_timeout=3500&;notification_timeout=3500
Example 3: esales://john:doe@cirrus.esales.apptus.com;stratus.esales.apptus.com?query_timeout=3500¬ification_timeout=3500
Unspecified ports defaults to 35000.
The available parameters are:
uriString
- The base URI to an eSales cluster.MalformedURLException
- if the URL contains errors.public static CloudConnector getOrCreate(String uriString, ExecutorService asyncTaskExecutor) throws MalformedURLException
uriString
already exists but has
a different executor service associated.
Works the same as getOrCreate(String)
, providing an ExecutorService allows healthcheck
calls to unresponsive nodes in a cluster to be run on a separate thread, without blocking other requests.uriString
- The base URI to an eSales cluster.asyncTaskExecutor
- Executor for health check tasks, or null for healthchecks in same thread.MalformedURLException
- if the URL contains errors.
Works like getOrCreate(String)
, but provide executor service for asyncCopyright © 2020 Apptus Technologies AB. All rights reserved.