Package | Description |
---|---|
io.sphere.sdk.client |
Provides types to connect to the API via HTTPS.
|
io.sphere.sdk.client.metrics |
Provides classes to collect metrics about a
SphereClient . |
io.sphere.sdk.client.retry | |
io.sphere.sdk.queries |
Provides types to prepare and receive queries.
|
io.sphere.sdk.sequencegenerators |
Modifier and Type | Interface and Description |
---|---|
interface |
BlockingSphereClient
A client for Composable Commerce which provides thread blocking and non-blocking methods to execute a request.
|
interface |
RetrySphereClientDecorator
Wraps a
SphereClient to handle failures like gateway timeouts and version conflicts through retrying the request. |
Modifier and Type | Class and Description |
---|---|
class |
DeprecationExceptionSphereClientDecorator
Decorator for
SphereClient s to throw exceptions on deprecated http calls. |
class |
QueueSphereClientDecorator
Decorates a
SphereClient to limit the amount of parallel requests which await an answer. |
class |
SphereClientDecorator
A public base class to decorate
SphereClient s. |
class |
TimeoutSphereClientDecorator
Wraps a
SphereClient to add timeouts. |
Modifier and Type | Method and Description |
---|---|
default SphereClient |
SphereClientFactory.createClient(SphereApiConfig config,
SphereAccessTokenSupplier tokenSupplier)
Creates a client with a custom service to provide access tokens.
|
default SphereClient |
SphereClientFactory.createClient(SphereClientConfig config)
Creates a standard client with configurable service URLs.
|
default SphereClient |
SphereClientFactory.createClient(String projectKey,
String clientId,
String clientSecret)
Creates a standard client suitable for online shops.
|
default SphereClient |
SphereClientFactory.createClient(String projectKey,
String clientId,
String clientSecret,
String authUrl,
String apiUrl)
Creates a standard client suitable for online shops.
|
default SphereClient |
SphereClientFactory.createClientOfApiConfigAndAccessToken(SphereApiConfig config,
String accessToken)
Creates a client which relies on an access token and does not refresh it.
|
default SphereClient |
SphereClientFactory.createClientOfApiConfigAndAccessToken(SphereApiConfig config,
String accessToken,
HttpClient httpClient)
Creates a client which relies on an access token and does not refresh it, it reuses an existing http client.
|
static SphereClient |
TestDoubleSphereClientFactory.createHttpTestDouble(Function<HttpRequestIntent,HttpResponse> function)
Creates a test double for a Composable Commerce client which enables to fake http responses from the API.
|
static SphereClient |
TestDoubleSphereClientFactory.createObjectTestDouble(Function<HttpRequestIntent,Object> function)
Creates a test double for a Composable Commerce client which enables to fake the results of the client as Java object.
|
static SphereClient |
SphereClient.of(SphereApiConfig config,
HttpClient httpClient,
SphereAccessTokenSupplier tokenSupplier)
Raw client creation.
|
static SphereClient |
SphereClient.of(SphereApiConfig config,
HttpClient httpClient,
SphereAccessTokenSupplier tokenSupplier,
List<SolutionInfo> additionalSolutionInfos)
Raw client creation.
|
static SphereClient |
DeprecationExceptionSphereClientDecorator.of(SphereClient delegate) |
static SphereClient |
TimeoutSphereClientDecorator.of(SphereClient delegate,
Duration duration) |
static SphereClient |
QueueSphereClientDecorator.of(SphereClient delegate,
int maxParallelRequests) |
static SphereClient |
QueueSphereClientDecorator.of(SphereClient delegate,
int maxParallelRequests,
boolean closeUnderlyingClient) |
static SphereClient |
RetrySphereClientDecorator.of(SphereClient delegate,
List<RetryRule> retryRules) |
static SphereClient |
TimeoutSphereClientDecorator.of(SphereClient delegate,
long delay,
TimeUnit timeUnit) |
Modifier and Type | Method and Description |
---|---|
static SphereClient |
DeprecationExceptionSphereClientDecorator.of(SphereClient delegate) |
static BlockingSphereClient |
BlockingSphereClient.of(SphereClient delegate,
Duration defaultTimeout)
Creates a blocking client with a configured default timeout for blocking requests.
|
static SphereClient |
TimeoutSphereClientDecorator.of(SphereClient delegate,
Duration duration) |
static SphereClient |
QueueSphereClientDecorator.of(SphereClient delegate,
int maxParallelRequests) |
static SphereClient |
QueueSphereClientDecorator.of(SphereClient delegate,
int maxParallelRequests,
boolean closeUnderlyingClient) |
static SphereClient |
RetrySphereClientDecorator.of(SphereClient delegate,
List<RetryRule> retryRules) |
static BlockingSphereClient |
BlockingSphereClient.of(SphereClient delegate,
long defaultTimeout,
TimeUnit unit)
Creates a blocking client with a configured default timeout for blocking requests.
|
static SphereClient |
TimeoutSphereClientDecorator.of(SphereClient delegate,
long delay,
TimeUnit timeUnit) |
Constructor and Description |
---|
SphereClientDecorator(SphereClient delegate) |
Modifier and Type | Class and Description |
---|---|
class |
SimpleMetricsSphereClient
A decorator for
SphereClient s which collects the time of serialization from and to JSON
as well as the time waiting for the response from the Composable Commerce API. |
Modifier and Type | Method and Description |
---|---|
static SimpleMetricsSphereClient |
SimpleMetricsSphereClient.of(SphereClient delegate) |
Modifier and Type | Method and Description |
---|---|
SphereClient |
RetryableSphereClientBuilder.build()
creates a SphereClient using the class configuration values.
|
protected SphereClient |
RetryableSphereClientBuilder.decorateSphereClient(SphereClient underlyingClient,
RetryAction retryAction,
int maxParallelRequests) |
Modifier and Type | Method and Description |
---|---|
protected SphereClient |
RetryableSphereClientBuilder.decorateSphereClient(SphereClient underlyingClient,
RetryAction retryAction,
int maxParallelRequests) |
Modifier and Type | Method and Description |
---|---|
static <T,C extends QueryDsl<T,C>> |
QueryExecutionUtils.queryAll(SphereClient client,
QueryDsl<T,C> query)
Queries all elements matching a query by using an offset based pagination with page size 500.
|
static <T,C extends QueryDsl<T,C>> |
QueryExecutionUtils.queryAll(SphereClient client,
QueryDsl<T,C> query,
Consumer<T> resultsConsumer)
Queries all elements matching a query by using an offset based pagination with page size 500.
|
static <T,C extends QueryDsl<T,C>> |
QueryExecutionUtils.queryAll(SphereClient client,
QueryDsl<T,C> query,
Consumer<T> resultsConsumer,
int pageSize)
Queries all elements matching a query by using an offset based pagination.
|
static <T,C extends QueryDsl<T,C>,S> |
QueryExecutionUtils.queryAll(SphereClient client,
QueryDsl<T,C> query,
Function<T,S> resultsMapper)
Queries all elements matching a query by using an offset based pagination with page size 500.
|
static <T,C extends QueryDsl<T,C>,S> |
QueryExecutionUtils.queryAll(SphereClient client,
QueryDsl<T,C> query,
Function<T,S> resultsMapper,
int pageSize)
Queries all elements matching a query by using an offset based pagination.
|
static <T,C extends QueryDsl<T,C>> |
QueryExecutionUtils.queryAll(SphereClient client,
QueryDsl<T,C> query,
int pageSize)
Queries all elements matching a query by using an offset based pagination.
|
Modifier and Type | Method and Description |
---|---|
SphereClient |
CustomObjectBigIntegerNumberGeneratorConfig.getSphereClient() |
Modifier and Type | Method and Description |
---|---|
static CustomObjectBigIntegerNumberGeneratorConfigBuilder |
CustomObjectBigIntegerNumberGeneratorConfigBuilder.of(SphereClient sphereClient,
String key)
Creates a new builder instance.
|