java-configuration-resiliencelisted
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