public final class DeprecationExceptionSphereClientDecorator extends SphereClientDecorator implements SphereClient
SphereClient
s to throw exceptions on deprecated http calls.
If the API returns a "X-DEPRECATION-NOTICE" header field,
it does not deserialize the response object in SphereRequest.deserialize(HttpResponse)
but throws a SphereDeprecationException
.
Modifier and Type | Method and Description |
---|---|
<T> CompletionStage<T> |
execute(SphereRequest<T> sphereRequest)
Executes asynchronously a request to Composable Commerce.
|
static SphereClient |
of(SphereClient delegate) |
close, getConfig
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
close, getConfig, of, of
public <T> CompletionStage<T> execute(SphereRequest<T> sphereRequest)
SphereClient
execute
in interface SphereClient
execute
in class SphereClientDecorator
T
- type of the result for the requestsphereRequest
- request to Composable Commerce to performpublic static SphereClient of(SphereClient delegate)