← ClaudeAtlas

java-configuration-resiliencelisted

Tune the PayPal Server SDK Java SDK client — retries, timeouts, transport, logging and the base URL. Load before changing any transport setting. The option list won't tell you a client built without `timeout(...)` waits forever, that the verb list does not stop a `POST` being re-sent, or what a rewriting interceptor does once retries are on.
MuHamza30/paypal-api-plugin · ★ 0 · DevOps & Infrastructure · score 70
Install: claude install-skill MuHamza30/paypal-api-plugin
# Configuration & resilience for an APIMatic Java SDK All configuration happens when you build the client (see **java-client-initialization**). Transport tuning is nested inside the `httpClientConfig` **lambda** — it is not on the client `Builder` directly: ```java import {rootPackage}.{Api}Client; import {rootPackage}.Environment; {Api}Client client = new {Api}Client.Builder() .environment(Environment.{MEMBER}) .httpClientConfig(configBuilder -> configBuilder .timeout(30) // SECONDS .numberOfRetries(3) .backOffFactor(2) .retryInterval(1) .shouldRetryOnTimeout(true)) .build(); ``` ## The full `HttpClientConfiguration.Builder` surface | Method | Type | Meaning | | --- | --- | --- | | `timeout(long)` | seconds | per-attempt request timeout — the generated Javadoc says *"The timeout in seconds"* | | `numberOfRetries(int)` | count | retries **after** the first attempt | | `backOffFactor(int)` | multiplier | *"to use in calculation of wait time for next request in case of failure"* | | `retryInterval(long)` | | the other half of that calculation — the base wait | | `maximumRetryWaitTime(long)` | | *"the maximum wait time for overall retrying requests"* | | `shouldRetryOnTimeout(boolean)` | | whether a timed-out attempt is retried | | `httpStatusCodesToRetry(Set<Integer>)` | | which statuses are retryable | | `httpMethodsToRetry(Set<HttpMethod>)` | | wh