Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- adapt(CompletableFuture<Object>) - Method in interface com.shri.restinpeace.CallAdapter
-
Adapts one already-in-flight call into
T. - adapt(Supplier<Page<Object>>) - Method in interface com.shri.restinpeace.PaginatedCallAdapter
-
Adapts a
@Paginatedmethod's page sequence intoT. - addCallAdapterFactory(CallAdapterFactory) - Static method in class com.shri.restinpeace.internal.RequestExecutor
-
Registers a global
CallAdapterFactory, unless this exact instance (by reference, notequals) is already registered. - addCallAdapterFactory(CallAdapterFactory) - Static method in class com.shri.restinpeace.RIP
-
Registers a global
CallAdapterFactory, letting a method declare a return type RIP itself has no built-in support for (e.g. - addError(String) - Method in class com.shri.restinpeace.validator.ValidationResult
-
Records a validation error.
- addHeader(String, String) - Method in class com.shri.restinpeace.interceptor.RequestContext
-
Adds a header to be sent with the request.
- addInterceptor(RequestInterceptor) - Static method in class com.shri.restinpeace.internal.RequestExecutor
-
Registers a global interceptor applied to every request/response made through RIP.
- addInterceptor(RequestInterceptor) - Static method in class com.shri.restinpeace.RIP
-
Registers a global hook into every request/response made through RIP - see
RequestInterceptorfor what it can and can't do. - addPaginatedCallAdapterFactory(PaginatedCallAdapterFactory) - Static method in class com.shri.restinpeace.internal.RequestExecutor
-
Registers a global
PaginatedCallAdapterFactory, unless this exact instance is already registered - identity-based, notequals-based, for the same reasonRequestExecutor.addCallAdapterFactory(com.shri.restinpeace.CallAdapterFactory)is. - addPaginatedCallAdapterFactory(PaginatedCallAdapterFactory) - Static method in class com.shri.restinpeace.RIP
-
Registers a global
PaginatedCallAdapterFactory, letting a@Paginatedmethod declare a return type RIP itself has no built-in support for (e.g. - advance() - Element in annotation type com.shri.restinpeace.annotation.pagination.Paginated
-
How the client advances when there's no server-given pointer at all (
pointerSource = NONE) - only meaningful together withpointerSource = NONE; ahasMoreSource/totalSource/totalPagesSourcetermination signal, if set, still takes precedence over the advance-based fallback (§6.5). - afterAll(ExtensionContext) - Method in class com.shri.restinpeace.mock.MockRestServerExtension
- afterResponse(RequestContext, int, Object) - Method in class com.shri.restinpeace.interceptor.LoggingInterceptor
- afterResponse(RequestContext, int, Object) - Method in class com.shri.restinpeace.interceptor.MetricsInterceptor
- afterResponse(RequestContext, int, Object) - Method in class com.shri.restinpeace.interceptor.RedactingLoggingInterceptor
- afterResponse(RequestContext, int, Object) - Method in interface com.shri.restinpeace.interceptor.RequestInterceptor
-
Called once the response is back.
- and(PaginationRequest) - Method in class com.shri.restinpeace.internal.PaginationRequestImpl
- and(PaginationRequest) - Method in interface com.shri.restinpeace.PaginationRequest
-
Combines this request's overrides with
other's - for a composite key needing more than one override applied to the same next request (e.g. twoPaginationRequest.withBodyField(java.lang.String, java.lang.Object)calls for a two-column keyset). - appendFormField(List<String>, String, Object) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
Appends one
@Field/@FieldMapentry to a@FormUrlEncodedmethod's accumulated body. - appendFormFieldMap(List<String>, Map<?, ?>) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
Also used directly by compile-time-generated code for a
@FieldMapparameter. - applyDownloadMonitor(HttpRequest<?>, DownloadProgressListener) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
Also used directly by compile-time-generated code for a
DownloadProgressListenerparameter. - applyFormUrlEncodedBody(HttpRequest<?>, List<String>) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
Finalizes a
@FormUrlEncodedmethod's accumulatedname=valuepairs into the request's body - the generated-code counterpart of the reflective path's own finalization inRequestExecutor.applyParams(kong.unirest.HttpRequest<?>, java.lang.reflect.Method, java.lang.Object[], com.shri.restinpeace.interceptor.RequestContext). - applyGeneratedBodyIfPresent(HttpRequest<?>, Object, RequestContext) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
The generated-code counterpart of
RequestExecutor.applyBody(kong.unirest.HttpRequest<?>, java.lang.reflect.Method, java.lang.Object, com.shri.restinpeace.interceptor.RequestContext), applying a@Bodyvalue only if it's non-null. - applyGeneratedHeaders(HttpRequest<?>, String[]) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
The generated-code counterpart of
RequestExecutor.applyFixedHeaders(kong.unirest.HttpRequest<?>, java.lang.reflect.Method), taking@Headers' entries as a literal. - applyHeaderMap(HttpRequest<?>, Map<?, ?>) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
Also used directly by compile-time-generated code for a
@HeaderMapparameter. - applyIdempotencyKeyIfNeeded(HttpRequest<?>, boolean) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
Sends a freshly generated
Idempotency-Keyheader whenidempotentis true - called once per call, before any attempt is made, so every retry of that call (which re-sends the samerequestobject) carries the identical value. - applyPartMap(MultipartBody, Map<?, ?>) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
Also used directly by compile-time-generated code for a
@PartMapparameter. - applyPartValue(MultipartBody, String, String, Object) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
Also used directly by compile-time-generated code for a
@Partparameter. - applyQueryMap(HttpRequest<?>, Map<?, ?>) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
Also used directly by compile-time-generated code for a
@QueryMapparameter. - applyQueryValue(HttpRequest<?>, String, Object) - Static method in class com.shri.restinpeace.internal.RequestExecutor
-
Adds a query param, repeating it once per element - instead of once with a single mangled
toString()value - whenvalueis aCollection(e.g. aList<String>of tags producing?tag=a&tag=b), matching Unirest's ownqueryString(String, Collection)overload thatObject-typed dispatch would otherwise never reach. - applyUploadMonitor(MultipartBody, UploadProgressListener) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
Also used directly by compile-time-generated code for an
UploadProgressListenerparameter.
B
- backoffMultiplier() - Element in annotation type com.shri.restinpeace.annotation.retry.Retry
-
The factor the delay is multiplied by after each retry -
1.0for a fixed delay, greater than1.0for exponential backoff. - backoffMultiplier(double) - Method in class com.shri.restinpeace.RetryConfig.Builder
-
Sets the factor the delay is multiplied by after each retry.
- baseUrl() - Method in class com.shri.restinpeace.mock.MockRestServer
-
Returns this server's base URL, to pass to
RIP.getClient(Class, String)orRipClientConfig.Builder.baseUrl(String). - baseUrl(String) - Method in class com.shri.restinpeace.RipClientConfig.Builder
-
Sets the runtime base URL.
- BaseUrl - Annotation Type in com.shri.restinpeace.annotation.marker
-
Declares the base URL for every relative method URL on a
@RestClientinterface, so@GET/@POST/etc. can use a path (e.g. - baseUrlProperty() - Element in annotation type com.shri.restinpeace.annotation.marker.RestClient
-
A property key naming this client's base URL, read only by the optional
rest-in-peace-spring-boot-startermodule - inert metadata as far asRIP.getClient(Class)and every other core-library consumer is concerned. - beforeAll(ExtensionContext) - Method in class com.shri.restinpeace.mock.MockRestServerExtension
- beforeEach(ExtensionContext) - Method in class com.shri.restinpeace.mock.MockRestServerExtension
- beforeRequest(RequestContext) - Method in class com.shri.restinpeace.interceptor.CorrelationIdInterceptor
- beforeRequest(RequestContext) - Method in class com.shri.restinpeace.interceptor.HeaderInterceptor
- beforeRequest(RequestContext) - Method in class com.shri.restinpeace.interceptor.LoggingInterceptor
- beforeRequest(RequestContext) - Method in class com.shri.restinpeace.interceptor.MetricsInterceptor
- beforeRequest(RequestContext) - Method in class com.shri.restinpeace.interceptor.RedactingLoggingInterceptor
- beforeRequest(RequestContext) - Method in interface com.shri.restinpeace.interceptor.RequestInterceptor
-
Called before the request is sent.
- beginGeneratedMultipart(HttpRequest<?>) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
The generated-code counterpart of the reflective path's own
((HttpRequestWithBody) request).multiPartContent()call for a@Multipartmethod - seeRequestExecutor.applyParams(kong.unirest.HttpRequest<?>, java.lang.reflect.Method, java.lang.Object[], com.shri.restinpeace.interceptor.RequestContext). - Body - Annotation Type in com.shri.restinpeace.annotation.request
-
Sends the annotated parameter as the request body.
- BODY - Enum constant in enum com.shri.restinpeace.constant.HTTPRequestParam
-
Bound via
@Body. - bodyField() - Element in annotation type com.shri.restinpeace.annotation.pagination.PaginationCursor
-
Dotted path inside a
@Body Map<String,Object>to set the extracted pointer value into - only meaningful when stacked on@Body; ignored otherwise. - bodyFields() - Method in class com.shri.restinpeace.internal.PaginationRequestImpl
- build() - Method in class com.shri.restinpeace.BulkheadConfig.Builder
-
Builds the config.
- build() - Method in class com.shri.restinpeace.CircuitBreakerConfig.Builder
-
Builds the config.
- build() - Method in class com.shri.restinpeace.RetryConfig.Builder
-
Builds the config.
- build() - Method in class com.shri.restinpeace.RipClientConfig.Builder
-
Builds the config.
- builder() - Static method in class com.shri.restinpeace.BulkheadConfig
-
Starts building a new config, defaulting to 25 max concurrent calls and failing fast (no wait) once that many are already in flight - resilience4j's own default shape for the same feature.
- builder() - Static method in class com.shri.restinpeace.CircuitBreakerConfig
-
Starts building a new config, defaulting to a count-based, 20-call window; a 50% failure-rate threshold, evaluated once at least 10 calls have been recorded; a 30-second open-state cooldown; 3 permitted half-open trial calls; and treating any 5xx response (or a transport failure) as a breaker failure.
- builder() - Static method in class com.shri.restinpeace.RetryConfig
-
Starts building a new retry config, defaulting to the exact same values
@Retry's own annotation defaults use. - builder() - Static method in class com.shri.restinpeace.RipClientConfig
-
Starts building a new config.
- bulkhead(BulkheadConfig) - Method in class com.shri.restinpeace.RipClientConfig.Builder
-
Sets this client's bulkhead - caps how many calls to this client can be in flight at once, so one slow or hung downstream can't starve every other call sharing the same connection pool/thread capacity.
- bulkhead(BulkheadProvider) - Method in class com.shri.restinpeace.RipClientConfig.Builder
-
Sets this client's bulkhead to delegate its admission decision to an already-running external bulkhead instance (resilience4j or otherwise) instead of RIP's own built-in
BulkheadConfig-drivenSemaphore. - BulkheadConfig - Class in com.shri.restinpeace
-
Per-client concurrency cap for
RIP.getClient(Class, RipClientConfig)- bounds how many calls to this client can be in flight at once, so one slow or hung downstream can't starve every other call sharing the same connection pool/thread capacity. - BulkheadConfig.Builder - Class in com.shri.restinpeace
-
Builds a
BulkheadConfig. - BulkheadFullException - Exception in com.shri.restinpeace.exception
-
Thrown instead of making a call when its client's
bulkheadhas no free permit (and, ifBulkheadConfig.getMaxWaitDurationMillis()is set, none freed up within that wait either) - too many calls to this client are already in flight. - BulkheadFullException(String) - Constructor for exception com.shri.restinpeace.exception.BulkheadFullException
-
Creates an exception with a message describing which client's bulkhead refused the call.
- BulkheadProvider - Interface in com.shri.restinpeace
-
Escape hatch for
RipClientConfig.Builder.bulkhead(BulkheadProvider)- delegates the actual admission decision to an already-running bulkhead instance (resilience4j or otherwise) instead of RIP's own built-inBulkheadConfig-drivenSemaphore.
C
- cache(Cache) - Method in class com.shri.restinpeace.RipClientConfig.Builder
-
Sets the
Cachefor this client, overriding the shared default set viaRIP.setCache(Cache)for this client only. - Cache - Interface in com.shri.restinpeace.cache
-
A pluggable store for
GETresponse caching, attached viaRipClientConfig.Builder.cache(Cache)(one client) orRIP.setCache(Cache)(the shared default for every client without its own). - CachedResponse - Class in com.shri.restinpeace.cache
-
A stored
GETresponse, as handed to and returned from aCacheimplementation. - CachedResponse(int, Map<String, List<String>>, String, long) - Constructor for class com.shri.restinpeace.cache.CachedResponse
-
Creates a cached entry with no
Varyheader - equivalent toCachedResponse(int, Map, String, long, Map)with an empty map. - CachedResponse(int, Map<String, List<String>>, String, long, Map<String, String>) - Constructor for class com.shri.restinpeace.cache.CachedResponse
-
Creates a cached entry, snapshotting the request header values its response's own
Varyheader named - so a later request whose values for those same headers differ is never served this entry. - CachedResponse(int, Map<String, List<String>>, String, long, Map<String, String>, long) - Constructor for class com.shri.restinpeace.cache.CachedResponse
-
Creates a cached entry with an explicit stale-while-revalidate deadline - a
Cache-Control: stale-while-revalidate=Nresponse may still be served, stale, up until this epoch millisecond, while a background revalidation refreshes the entry for the next call (seeCachedResponse.isWithinStaleWhileRevalidateWindow()). - cacheKeyIncludesQueryString(boolean) - Method in class com.shri.restinpeace.RipClientConfig.Builder
-
Sets whether this client's cache key includes the request's query string, overriding the shared default set via
RIP.setCacheKeyIncludesQueryString(boolean)(itselftrueby default, matching RIP's own established behavior) for this client only. - CallAdapter<T> - Interface in com.shri.restinpeace
-
Adapts a
@RestClientcall's outcome into a consumer-chosen return typeT, for a return-type shape RIP itself has no built-in support for (e.g. - CallAdapterFactory - Interface in com.shri.restinpeace
-
Recognizes a method's declared return type and produces a
CallAdapterfor it, or declines. - circuitBreaker(CircuitBreakerConfig) - Method in class com.shri.restinpeace.RipClientConfig.Builder
-
Sets this client's circuit breaker - stops even attempting calls to this client once its failure rate crosses a threshold, for a cooldown period, instead of paying the cost of finding out each one would have failed too.
- circuitBreaker(CircuitBreakerProvider) - Method in class com.shri.restinpeace.RipClientConfig.Builder
-
Sets this client's circuit breaker to delegate its open/closed decision to an already-running external breaker instance (resilience4j or otherwise) instead of RIP's own built-in
CircuitBreakerConfig-driven state machine. - CircuitBreakerConfig - Class in com.shri.restinpeace
-
Per-client circuit breaker for
RIP.getClient(Class, RipClientConfig)- stops even attempting calls to a downstream that's shown itself to be failing, for a cooldown period, once its failure rate crosses a threshold. - CircuitBreakerConfig.Builder - Class in com.shri.restinpeace
-
Builds a
CircuitBreakerConfig. - CircuitBreakerConfig.SlidingWindowType - Enum in com.shri.restinpeace
-
Whether the sliding window counts the last N calls or the last N seconds.
- CircuitBreakerProvider - Interface in com.shri.restinpeace
-
Escape hatch for
RipClientConfig.Builder.circuitBreaker(CircuitBreakerProvider)- delegates the actual open/closed decision to an already-running circuit breaker instance (resilience4j or otherwise) instead of RIP's own built-inCircuitBreakerConfig-driven state machine. - CircuitOpenException - Exception in com.shri.restinpeace.exception
-
Thrown instead of making a call when its client's
circuit breakeris open - the downstream has recently shown a high enough failure rate that this call is refused immediately, without attempting the network call (or even a cache lookup), rather than paying the cost of finding out it would have failed too. - CircuitOpenException(String) - Constructor for exception com.shri.restinpeace.exception.CircuitOpenException
-
Creates an exception with a message describing which client refused the call.
- clear() - Method in interface com.shri.restinpeace.cache.Cache
-
Removes every stored entry.
- clear() - Method in class com.shri.restinpeace.cache.InMemoryCache
- clearCallAdapterFactories() - Static method in class com.shri.restinpeace.internal.RequestExecutor
-
Removes all registered
CallAdapterFactorys. - clearCallAdapterFactories() - Static method in class com.shri.restinpeace.RIP
-
Removes every registered
CallAdapterFactory. - clearInterceptors() - Static method in class com.shri.restinpeace.internal.RequestExecutor
-
Removes all registered interceptors.
- clearInterceptors() - Static method in class com.shri.restinpeace.RIP
-
Removes all registered interceptors.
- clearPaginatedCallAdapterFactories() - Static method in class com.shri.restinpeace.internal.RequestExecutor
-
Removes all registered
PaginatedCallAdapterFactorys. - clearPaginatedCallAdapterFactories() - Static method in class com.shri.restinpeace.RIP
-
Removes every registered
PaginatedCallAdapterFactory. - close() - Method in class com.shri.restinpeace.mock.MockRestServer
-
Stops the server.
- com.shri.restinpeace - package com.shri.restinpeace
- com.shri.restinpeace.annotation.cache - package com.shri.restinpeace.annotation.cache
- com.shri.restinpeace.annotation.error - package com.shri.restinpeace.annotation.error
- com.shri.restinpeace.annotation.marker - package com.shri.restinpeace.annotation.marker
- com.shri.restinpeace.annotation.method - package com.shri.restinpeace.annotation.method
- com.shri.restinpeace.annotation.method.meta - package com.shri.restinpeace.annotation.method.meta
- com.shri.restinpeace.annotation.pagination - package com.shri.restinpeace.annotation.pagination
- com.shri.restinpeace.annotation.request - package com.shri.restinpeace.annotation.request
- com.shri.restinpeace.annotation.retry - package com.shri.restinpeace.annotation.retry
- com.shri.restinpeace.annotation.timeout - package com.shri.restinpeace.annotation.timeout
- com.shri.restinpeace.cache - package com.shri.restinpeace.cache
- com.shri.restinpeace.codegen - package com.shri.restinpeace.codegen
- com.shri.restinpeace.constant - package com.shri.restinpeace.constant
- com.shri.restinpeace.download - package com.shri.restinpeace.download
- com.shri.restinpeace.exception - package com.shri.restinpeace.exception
- com.shri.restinpeace.interceptor - package com.shri.restinpeace.interceptor
- com.shri.restinpeace.internal - package com.shri.restinpeace.internal
- com.shri.restinpeace.mock - package com.shri.restinpeace.mock
- com.shri.restinpeace.multipart - package com.shri.restinpeace.multipart
- com.shri.restinpeace.processor - package com.shri.restinpeace.processor
- com.shri.restinpeace.proxy - package com.shri.restinpeace.proxy
- com.shri.restinpeace.upload - package com.shri.restinpeace.upload
- com.shri.restinpeace.validator - package com.shri.restinpeace.validator
- connectionFailure() - Static method in class com.shri.restinpeace.mock.MockResponse
-
Simulates a transport-level failure - the connection is closed before any response is sent, instead of returning an HTTP status - so a test can exercise RIP's "no response at all" error path (a
kong.unirest.UnirestExceptionthrown directly, not wrapped inRestInPeaceHttpException, and always retried by@Retryregardless ofretryOnStatus) instead of only ever seeing a non-2xx status. - connectMillis() - Element in annotation type com.shri.restinpeace.annotation.timeout.Timeout
-
The connect timeout in milliseconds, or
-1(the default) to leave the connect timeout at whatever it would otherwise be. - connectTimeoutMillis(int) - Method in class com.shri.restinpeace.RipClientConfig.Builder
-
Sets the connect timeout.
- CorrelationIdInterceptor - Class in com.shri.restinpeace.interceptor
-
Pre-built interceptor that attaches a fresh correlation/request ID to every request - useful for tracing a call across service boundaries or correlating client-side logs with server-side logs.
- CorrelationIdInterceptor() - Constructor for class com.shri.restinpeace.interceptor.CorrelationIdInterceptor
-
Generates a random UUID per call, sent under
CorrelationIdInterceptor.DEFAULT_HEADER_NAME. - CorrelationIdInterceptor(String) - Constructor for class com.shri.restinpeace.interceptor.CorrelationIdInterceptor
-
Generates a random UUID per call, sent under a custom header name.
- CorrelationIdInterceptor(String, Supplier<String>) - Constructor for class com.shri.restinpeace.interceptor.CorrelationIdInterceptor
-
Uses a custom ID generator instead of a random UUID.
- COUNT_BASED - Enum constant in enum com.shri.restinpeace.CircuitBreakerConfig.SlidingWindowType
-
The last
CircuitBreakerConfig.getSlidingWindowSize()calls - the default. - countOf(HTTPMethod, String) - Method in class com.shri.restinpeace.mock.MockRestServer
-
Returns how many recorded requests match
httpMethodandpathTemplate- a check for "was this endpoint called, and how many times" without manually filteringMockRestServer.getRecordedRequests()or looping overMockRestServer.takeRequest(). - createGeneratedRequest(HTTPMethod, String, int, int) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
Builds the request and applies its
@Timeout(if any) - the generated-code counterpart ofRequestExecutor.createRequest(HTTPMethod, String)plusRequestExecutor.applyTimeout(HttpRequest, Method), taking@Timeout's values as literals (or-1, its own "unset" default, for a method with none) instead of a reflective lookup.
D
- DEFAULT - Static variable in class com.shri.restinpeace.constant.RIPConstants
-
Sentinel default value for annotation attributes with no meaningful default.
- DEFAULT_HEADER_NAME - Static variable in class com.shri.restinpeace.interceptor.CorrelationIdInterceptor
-
The header used when no header name is given explicitly.
- DEFAULT_SENSITIVE_FIELD_NAMES - Static variable in class com.shri.restinpeace.interceptor.RedactingLoggingInterceptor
-
The field names masked by default:
password,token,secret,apiKey,ssn, andauthorization. - defaultValue() - Element in annotation type com.shri.restinpeace.annotation.request.Field
-
Value used when the argument is
null. - defaultValue() - Element in annotation type com.shri.restinpeace.annotation.request.HeaderParam
-
Value used when the argument is
null. - defaultValue() - Element in annotation type com.shri.restinpeace.annotation.request.Part
-
Value used when the argument is
null- sent as a plainStringpart, same as if it had been the argument itself. - defaultValue() - Element in annotation type com.shri.restinpeace.annotation.request.QueryParam
-
Value used when the argument is
null. - delay(long) - Method in class com.shri.restinpeace.mock.MockResponse
-
Delays sending this response by
delayMillis, to simulate a slow server - the way to prove@Timeout(readMillis = ...)(orRipClientConfig.readTimeoutMillis(...)) actually fires, rather than assuming it does because the annotation is present. - delayMillis() - Element in annotation type com.shri.restinpeace.annotation.retry.Retry
-
How long to wait before the first retry, in milliseconds - overridden for that one wait whenever the response being retried carries a
Retry-Afterheader (as a delta-seconds value or an HTTP-date), since the server's own stated wait time is more authoritative than a value fixed at compile time. - delayMillis(long) - Method in class com.shri.restinpeace.RetryConfig.Builder
-
Sets how long to wait before the first retry.
- DELETE - Enum constant in enum com.shri.restinpeace.constant.HTTPMethod
-
HTTP DELETE.
- DELETE - Annotation Type in com.shri.restinpeace.annotation.method
-
Marks a method as issuing an HTTP DELETE request to the given URL template.
- Destination - Annotation Type in com.shri.restinpeace.annotation.request
-
Marks the
java.io.Fileparameter aFile-returning method writes its response body into, instead of buffering the whole body into abyte[]: - DownloadProgressListener - Interface in com.shri.restinpeace.download
-
Notified as a
byte[]- orFile-returning method's response body streams in, for surfacing download progress (a progress bar, a percentage log line) on a large download.
E
- enqueue(MockResponse) - Method in class com.shri.restinpeace.mock.MockRestServer
-
Queues a response for the next request that doesn't match any route registered via
MockRestServer.on(com.shri.restinpeace.constant.HTTPMethod, java.lang.String, com.shri.restinpeace.mock.MockResponse)- a route always wins over this queue for a request it matches, so this only ever answers a path with no matching route at all. - enqueueFor(HTTPMethod, String, MockResponse) - Method in class com.shri.restinpeace.mock.MockRestServer
-
Scripts a one-time response for a route already registered via
MockRestServer.on(HTTPMethod, String, MockResponse), consumed - in the order queued - before that route's sticky response, the way to combine a scripted failure sequence with a sticky final answer for the same path (e.g. a503then a200, to prove@Retryrecovers, while every request after that still gets the200the route was registered with). - enqueueFor(HTTPMethod, String, Map<String, String>, MockResponse) - Method in class com.shri.restinpeace.mock.MockRestServer
-
Same as
MockRestServer.enqueueFor(HTTPMethod, String, MockResponse), for a route registered viaMockRestServer.on(HTTPMethod, String, Map, MockResponse)with the samerequiredQueryParams. - ErrorType - Annotation Type in com.shri.restinpeace.annotation.error
-
Declares what class to deserialize a method's error response body into.
- evict(String) - Method in interface com.shri.restinpeace.cache.Cache
-
Removes the entry for
key, if any - e.g. after a mutating call (aPOST/PUT/DELETE) that's known to invalidate a previously-cachedGET. - evict(String) - Method in class com.shri.restinpeace.cache.InMemoryCache
F
- failureRateThreshold(int) - Method in class com.shri.restinpeace.CircuitBreakerConfig.Builder
-
Sets the failure-rate threshold that trips the breaker open.
- Field - Annotation Type in com.shri.restinpeace.annotation.request
-
One name/value pair of a
@FormUrlEncodedmethod's form-urlencoded body. - FieldMap - Annotation Type in com.shri.restinpeace.annotation.request
-
A
Map<String, ?>parameter of a@FormUrlEncodedmethod adding one form field per entry, for a set of field names not known until runtime - the@FieldMapcounterpart to@QueryMapand@PartMap. - fileName() - Element in annotation type com.shri.restinpeace.annotation.request.Part
-
The file name sent for a
byte[]/java.io.InputStreamvalue, or to override ajava.io.Filevalue's own name. - finishGeneratedAsync(HttpRequest<?>, RequestContext, Class<?>, Class<?>, boolean, int, long, double, double, int[]) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
The generated-code counterpart of
RequestExecutor.processAsync(kong.unirest.HttpRequest<?>, java.lang.reflect.Method, java.lang.Object[], com.shri.restinpeace.interceptor.RequestContext)'s plain (non-byte[]/File/RipResponse) branch. - finishGeneratedAsyncBytes(HttpRequest<?>, RequestContext, Class<?>, boolean, int, long, double, double, int[]) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
The generated-code counterpart of
RequestExecutor.processAsync(kong.unirest.HttpRequest<?>, java.lang.reflect.Method, java.lang.Object[], com.shri.restinpeace.interceptor.RequestContext)'sbyte[]-inner-type branch. - finishGeneratedAsyncFile(HttpRequest<?>, RequestContext, File, Class<?>, boolean, int, long, double, double, int[]) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
The generated-code counterpart of
RequestExecutor.processAsync(kong.unirest.HttpRequest<?>, java.lang.reflect.Method, java.lang.Object[], com.shri.restinpeace.interceptor.RequestContext)'sFile-inner-type branch. - finishGeneratedAsyncRipResponse(HttpRequest<?>, RequestContext, Class<?>, Class<?>, boolean, int, long, double, double, int[]) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
The generated-code counterpart of
RequestExecutor.processAsync(kong.unirest.HttpRequest<?>, java.lang.reflect.Method, java.lang.Object[], com.shri.restinpeace.interceptor.RequestContext)'sRipResponse<T>-inner-type branch for aString/POJOT. - finishGeneratedAsyncRipResponseBytes(HttpRequest<?>, RequestContext, Class<?>, boolean, int, long, double, double, int[]) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
The
byte[]-wrapped counterpart ofRequestExecutor.finishGeneratedAsyncRipResponse(kong.unirest.HttpRequest<?>, com.shri.restinpeace.interceptor.RequestContext, java.lang.Class<?>, java.lang.Class<?>, boolean, int, long, double, double, int[]), for aCompletableFuture<RipResponse<byte[]>>return type. - finishGeneratedSync(HttpRequest<?>, RequestContext, Class<?>, Class<?>, boolean, int, long, double, double, int[]) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
Executes and decodes a sync request whose return type is
void,String, or a POJO - the generated-code counterpart of the plain (non-byte[]/File/RipResponse/CompletableFuture) branch ofRequestExecutor.processRestRequest(java.lang.reflect.Method, com.shri.restinpeace.constant.HTTPMethod, java.lang.Object[]), applying registered interceptors first. - finishGeneratedSyncBytes(HttpRequest<?>, RequestContext, Class<?>, boolean, int, long, double, double, int[]) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
The generated-code counterpart of
RequestExecutor.processRestRequest(java.lang.reflect.Method, com.shri.restinpeace.constant.HTTPMethod, java.lang.Object[])'sbyte[]-return branch. - finishGeneratedSyncFile(HttpRequest<?>, RequestContext, File, Class<?>, boolean, int, long, double, double, int[]) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
The generated-code counterpart of
RequestExecutor.processRestRequest(java.lang.reflect.Method, com.shri.restinpeace.constant.HTTPMethod, java.lang.Object[])'sFile-return branch. - finishGeneratedSyncRipResponse(HttpRequest<?>, RequestContext, Class<?>, Class<?>, boolean, int, long, double, double, int[]) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
The generated-code counterpart of
RequestExecutor.processRestRequest(java.lang.reflect.Method, com.shri.restinpeace.constant.HTTPMethod, java.lang.Object[])'sRipResponse<T>-return branch for aString/POJOT-innerTypeisT. - finishGeneratedSyncRipResponseBytes(HttpRequest<?>, RequestContext, Class<?>, boolean, int, long, double, double, int[]) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
The
byte[]-wrapped counterpart ofRequestExecutor.finishGeneratedSyncRipResponse(kong.unirest.HttpRequest<?>, com.shri.restinpeace.interceptor.RequestContext, java.lang.Class<?>, java.lang.Class<?>, boolean, int, long, double, double, int[]), for aRipResponse<byte[]>return type. - FormUrlEncoded - Annotation Type in com.shri.restinpeace.annotation.request
-
Marks a method as sending an
application/x-www-form-urlencodedbody built from its@Field/@FieldMap-annotated parameters, instead of the JSON/raw-string body a@Bodyparameter would send, or themultipart/form-databody@Multipartwould send. - FULL_URL - Enum constant in enum com.shri.restinpeace.annotation.pagination.PointerKind
-
The extracted pointer is a complete next-page URL, followed the same way an
@Urlparameter's value would be - no@PaginationCursorparameter is used (there's nothing to inject into).
G
- generate(File, File, String, String) - Static method in class com.shri.restinpeace.codegen.OpenApiClientGenerator
-
Reads
specFileas an OpenAPI 3.x JSON document and writes a generated@RestClientinterface to<outputDirectory>/<interfaceName>.java, creatingoutputDirectory(and any missing parent directories) if needed. - get(Method) - Method in interface com.shri.restinpeace.CallAdapterFactory
- get(Method) - Method in interface com.shri.restinpeace.PaginatedCallAdapterFactory
- get(String) - Method in interface com.shri.restinpeace.cache.Cache
-
Returns the entry stored for
key, whether or not it's still fresh - a stale entry may still be usable for revalidation (seeCachedResponse.isFresh()). - get(String) - Method in class com.shri.restinpeace.cache.InMemoryCache
- GET - Enum constant in enum com.shri.restinpeace.constant.HTTPMethod
-
HTTP GET.
- GET - Annotation Type in com.shri.restinpeace.annotation.method
-
Marks a method as issuing an HTTP GET request to the given URL template.
- getAllErrors() - Method in class com.shri.restinpeace.validator.ValidationResult
-
Joins every recorded error into a single human-readable string.
- getAttribute(String) - Method in class com.shri.restinpeace.interceptor.RequestContext
-
Reads back an attribute previously stashed via
RequestContext.setAttribute(java.lang.String, java.lang.Object). - getBackoffMultiplier() - Method in class com.shri.restinpeace.RetryConfig
-
Returns the backoff multiplier.
- getBaseUrl() - Method in class com.shri.restinpeace.RipClientConfig
-
Returns the runtime base URL.
- getBody() - Method in class com.shri.restinpeace.cache.CachedResponse
-
Returns the original response body.
- getBody() - Method in class com.shri.restinpeace.interceptor.RequestContext
-
Returns this call's request body - the exact bytes RIP itself is about to send for a
@Bodyparameter (a rawStringverbatim, a POJO serialized through the same configuredObjectMapper), for an interceptor that needs the literal outgoing body - e.g. a request-signing interceptor (AWS SigV4, an HMAC webhook signature, OAuth1) computing a signature over it before adding the result as a header viaRequestContext.addHeader(java.lang.String, java.lang.String). - getBody() - Method in class com.shri.restinpeace.interceptor.ShortCircuitResponse
-
Returns the response body.
- getBody() - Method in class com.shri.restinpeace.mock.RecordedRequest
-
Returns the raw request body, decoded as UTF-8 - for a binary body (a
@Multipartrequest in particular, whose parts may not be text at all), decoding as a single UTF-8 string is lossy; useRecordedRequest.getRawBody()orRecordedRequest.getParts()instead. - getBody() - Method in class com.shri.restinpeace.RipResponse
-
Returns the decoded response body.
- getBulkhead() - Method in class com.shri.restinpeace.RipClientConfig
-
Returns this client's bulkhead.
- getBulkheadProvider() - Method in class com.shri.restinpeace.RipClientConfig
-
Returns this client's external bulkhead provider.
- getCache() - Method in class com.shri.restinpeace.RipClientConfig
-
Returns the
Cachefor this client. - getCacheKeyIncludesQueryString() - Method in class com.shri.restinpeace.RipClientConfig
-
Returns whether this client's cache key includes the request's query string.
- getCircuitBreaker() - Method in class com.shri.restinpeace.RipClientConfig
-
Returns this client's circuit breaker.
- getCircuitBreakerProvider() - Method in class com.shri.restinpeace.RipClientConfig
-
Returns this client's external circuit breaker provider.
- getClient(Class<T>) - Static method in class com.shri.restinpeace.RIP
-
Validates
restClientand returns a proxy implementing it, where each method call issues the HTTP request its annotations describe. - getClient(Class<T>, RipClientConfig) - Static method in class com.shri.restinpeace.RIP
-
Same as
RIP.getClient(Class), but resolves the base URL, connect/read timeout, and proxy fromconfiginstead of the interface's@BaseUrland the shared client's global config - for a@RestClientwhose environment (base URL, timeout, proxy) differs from every other client's. - getClient(Class<T>, String) - Static method in class com.shri.restinpeace.RIP
-
Same as
RIP.getClient(Class), but every relative method URL is resolved againstbaseUrlinstead of the interface's@BaseUrl- for a base URL that's only known at runtime (e.g. - getConnectTimeoutMillis() - Method in class com.shri.restinpeace.RipClientConfig
-
Returns the connect timeout.
- getContent() - Method in class com.shri.restinpeace.mock.RecordedRequest.Part
-
Returns this part's raw content bytes.
- getContentAsString() - Method in class com.shri.restinpeace.mock.RecordedRequest.Part
-
Returns this part's content decoded as UTF-8, for a text part (a plain
Stringform field, or a text file). - getContentType() - Method in class com.shri.restinpeace.mock.RecordedRequest.Part
-
Returns this part's
Content-Type, if one was sent. - getDelayMillis() - Method in class com.shri.restinpeace.RetryConfig
-
Returns the initial retry delay.
- getErrorBody() - Method in exception com.shri.restinpeace.exception.RestInPeaceHttpException
-
Returns the response body deserialized into the method's
@ErrorType, or the raw body itself if the method has no@ErrorType. - getErrors() - Method in class com.shri.restinpeace.validator.ValidationResult
-
Returns the errors collected so far.
- getFailureRateThreshold() - Method in class com.shri.restinpeace.CircuitBreakerConfig
-
Returns the failure-rate trip threshold.
- getFileName() - Method in class com.shri.restinpeace.mock.RecordedRequest.Part
-
Returns this part's file name, for a
File/byte[]/InputStreampart sent as a file. - getFileName() - Method in class com.shri.restinpeace.multipart.PartValue
-
Returns the file name to send the wrapped value under.
- getFormFields() - Method in class com.shri.restinpeace.mock.RecordedRequest
-
Decodes an
application/x-www-form-urlencodedbody into its field name/value pairs, for asserting on what a@FormUrlEncodedmethod actually sent - a repeated key (from a@FieldMapentry, or aCollection-valued@Field) collects every value, in the order sent. - getFreshUntilEpochMillis() - Method in class com.shri.restinpeace.cache.CachedResponse
-
Returns the epoch millisecond after which this entry is stale.
- getHeader(String) - Method in class com.shri.restinpeace.cache.CachedResponse
-
Returns the first value of a response header, matched case-insensitively.
- getHeader(String) - Method in class com.shri.restinpeace.mock.RecordedRequest
-
Returns the first value of a request header, matched case-insensitively.
- getHeader(String) - Method in class com.shri.restinpeace.RipResponse
-
Returns the first value of a response header, since most headers only ever carry one.
- getHeaders() - Method in class com.shri.restinpeace.cache.CachedResponse
-
Returns the original response's headers, keyed case-insensitively.
- getHeaders() - Method in class com.shri.restinpeace.interceptor.RequestContext
-
Returns the headers added so far via
RequestContext.addHeader(String, String). - getHeaders() - Method in class com.shri.restinpeace.interceptor.ShortCircuitResponse
-
Returns the response headers added via
ShortCircuitResponse.header(java.lang.String, java.lang.String). - getHeaders() - Method in class com.shri.restinpeace.mock.RecordedRequest
-
Returns the request headers, keyed by name (case-insensitively).
- getHeaders() - Method in class com.shri.restinpeace.RipResponse
-
Returns the response headers.
- getHttpMethod() - Method in class com.shri.restinpeace.interceptor.RequestContext
-
Returns the HTTP method of the request being made.
- getHttpMethod() - Method in class com.shri.restinpeace.mock.RecordedRequest
-
Returns the HTTP method of the request.
- getInterceptors() - Method in class com.shri.restinpeace.RipClientConfig
-
Returns this client's own interceptors.
- getJitterFactor() - Method in class com.shri.restinpeace.RetryConfig
-
Returns the jitter fraction.
- getMaxConcurrentCalls() - Method in class com.shri.restinpeace.BulkheadConfig
-
Returns the concurrency cap.
- getMaxWaitDurationMillis() - Method in class com.shri.restinpeace.BulkheadConfig
-
Returns how long a call waits for a free permit before being refused.
- getMinimumNumberOfCalls() - Method in class com.shri.restinpeace.CircuitBreakerConfig
-
Returns the minimum sample size before a failure rate is evaluated.
- getName() - Method in class com.shri.restinpeace.mock.RecordedRequest.Part
-
Returns this part's name - the
@Part'svalue, or the entry's key for a@PartMappart. - getNegativeCacheTtlMillis() - Method in class com.shri.restinpeace.RipClientConfig
-
Returns how long this client negatively caches a confirmed
404. - getObjectMapper() - Method in class com.shri.restinpeace.RipClientConfig
-
Returns the JSON
ObjectMapperfor this client. - getParts() - Method in class com.shri.restinpeace.mock.RecordedRequest
-
Decodes a
multipart/form-databody into its individual parts, for asserting on what a@Multipartmethod actually sent - each@Part/@PartMapentry becomes oneRecordedRequest.Part, with its name, optional file name, optional content type, and content. - getPath() - Method in class com.shri.restinpeace.mock.RecordedRequest
-
Returns the request path, without the query string.
- getPermittedCallsInHalfOpenState() - Method in class com.shri.restinpeace.CircuitBreakerConfig
-
Returns how many trial calls are permitted while half-open.
- getProxyHost() - Method in class com.shri.restinpeace.RipClientConfig
-
Returns the proxy host.
- getProxyPassword() - Method in class com.shri.restinpeace.RipClientConfig
-
Returns the proxy password.
- getProxyPort() - Method in class com.shri.restinpeace.RipClientConfig
-
Returns the proxy port.
- getProxyUsername() - Method in class com.shri.restinpeace.RipClientConfig
-
Returns the proxy username.
- getQueryParam(String) - Method in class com.shri.restinpeace.mock.RecordedRequest
-
Returns the first value of a query param, since most are only ever sent once.
- getQueryParams(String) - Method in class com.shri.restinpeace.mock.RecordedRequest
-
Returns every value of a query param, matched case-sensitively (query param names, unlike headers, are case-sensitive per the URL spec).
- getRawBody() - Method in exception com.shri.restinpeace.exception.RestInPeaceHttpException
-
Returns the response's raw body, regardless of whether the method declared an
@ErrorType. - getRawBody() - Method in class com.shri.restinpeace.mock.RecordedRequest
-
Returns the raw request body bytes, exactly as received - unlike
RecordedRequest.getBody(), safe for a binary body. - getReadTimeoutMillis() - Method in class com.shri.restinpeace.RipClientConfig
-
Returns the read (socket) timeout.
- getReceivedAt() - Method in class com.shri.restinpeace.mock.RecordedRequest
-
Returns when this request was fully received - the way to verify timing-sensitive behavior like
@Retry'sdelayMillis/backoffMultiplieractually growing the wait between attempts, rather than only counting how many attempts were made. - getRecordedRequests() - Method in class com.shri.restinpeace.mock.MockRestServer
-
Returns every request recorded so far, oldest first, without consuming them - unlike
MockRestServer.takeRequest(). - getRecordFailureForStatus() - Method in class com.shri.restinpeace.CircuitBreakerConfig
-
Returns the predicate deciding which HTTP status codes count as a breaker failure.
- getRetry() - Method in class com.shri.restinpeace.RipClientConfig
-
Returns this client's default retry policy.
- getRetryAfterMillis() - Method in exception com.shri.restinpeace.exception.RestInPeaceHttpException
-
Returns the response's own
Retry-Afterheader, parsed to milliseconds from now - the exact same parsing@Retryitself uses internally (delta-seconds, a plain integer, or an HTTP-date per RFC 1123), surfaced here for a caller whose method has no@Retryat all (or one that gave up after exhausting its attempts) and wants to honor the server's own backoff hint manually. - getRetryBudgetMaxRetries() - Method in class com.shri.restinpeace.RipClientConfig
-
Returns this client's retry-budget capacity.
- getRetryBudgetWindowMillis() - Method in class com.shri.restinpeace.RipClientConfig
-
Returns this client's retry-budget refill window.
- getRetryOnStatus() - Method in class com.shri.restinpeace.RetryConfig
-
Returns the retryable HTTP status codes.
- getServer() - Method in class com.shri.restinpeace.mock.MockRestServerExtension
-
Returns the server for the current test class - only meaningful once
beforeAllhas run. - getSlidingWindowDurationMillis() - Method in class com.shri.restinpeace.CircuitBreakerConfig
-
Returns the time-based window's duration.
- getSlidingWindowSize() - Method in class com.shri.restinpeace.CircuitBreakerConfig
-
Returns the count-based window's size.
- getSlidingWindowType() - Method in class com.shri.restinpeace.CircuitBreakerConfig
-
Returns the sliding window's type.
- getStaleWhileRevalidateUntilEpochMillis() - Method in class com.shri.restinpeace.cache.CachedResponse
-
Returns the epoch millisecond up to which this entry may still be served stale while a background revalidation refreshes it, per a
Cache-Control: stale-while-revalidate=Nresponse - equal toCachedResponse.getFreshUntilEpochMillis()(no window at all) for an entry whose response named no such directive. - getStatus() - Method in class com.shri.restinpeace.cache.CachedResponse
-
Returns the original response's HTTP status code.
- getStatus() - Method in exception com.shri.restinpeace.exception.RestInPeaceHttpException
-
Returns the response's HTTP status.
- getStatus() - Method in class com.shri.restinpeace.interceptor.ShortCircuitResponse
-
Returns the response status code.
- getStatus() - Method in class com.shri.restinpeace.RipResponse
-
Returns the HTTP response status code.
- getStoredAtEpochMillis() - Method in class com.shri.restinpeace.cache.CachedResponse
-
Returns when this entry was constructed - at initial storage, or the moment a stale entry was last successfully revalidated (a fresh
CachedResponseinstance is created either way; this class is immutable). - getTimes() - Method in class com.shri.restinpeace.RetryConfig
-
Returns the maximum number of attempts.
- getUnhitRoutes() - Method in class com.shri.restinpeace.mock.MockRestServer
-
Returns every registered route that hasn't matched any recorded request yet, as
"METHOD path"strings (e.g. - getUrl() - Method in class com.shri.restinpeace.interceptor.RequestContext
-
Returns the fully resolved URL of the request being made.
- getValidationResult() - Method in exception com.shri.restinpeace.exception.RestInPeaceValidationException
-
Returns the full validation result, including every error found.
- getValue() - Method in class com.shri.restinpeace.multipart.PartValue
-
Returns the wrapped part value.
- getVaryRequestHeaders() - Method in class com.shri.restinpeace.cache.CachedResponse
-
Returns the request header values this entry's
Varyheader named, snapshotted at storage time. - getWaitDurationInOpenStateMillis() - Method in class com.shri.restinpeace.CircuitBreakerConfig
-
Returns how long the breaker stays open before trialing recovery.
H
- hasError() - Method in class com.shri.restinpeace.validator.ValidationResult
-
Returns whether any error has been recorded.
- hasMoreField() - Element in annotation type com.shri.restinpeace.annotation.pagination.Paginated
-
Where the
Paginated.hasMoreSource()boolean is read from within that source. - hasMoreSource() - Element in annotation type com.shri.restinpeace.annotation.pagination.Paginated
-
Where a "more pages exist" boolean signal is read from, if any - authoritative over pointer presence when set (§6.5).
- hasNext() - Method in interface com.shri.restinpeace.Page
-
Returns whether
Page.next()would fetch another page - per the termination precedence indocs/design/pagination-helper.md§6.5 (ahasMoresignal, then a total-record/total-page comparison, then pointer presence, always layered under an empty-page safety net). - HEAD - Enum constant in enum com.shri.restinpeace.constant.HTTPMethod
-
HTTP HEAD.
- HEAD - Annotation Type in com.shri.restinpeace.annotation.method
-
Marks a method as issuing an HTTP HEAD request to the given URL template.
- header(String) - Method in interface com.shri.restinpeace.PaginationContext
-
Returns the named response header's value, or
nullif the response didn't carry it. - header(String, String) - Method in class com.shri.restinpeace.interceptor.ShortCircuitResponse
-
Adds a header value, in addition to any already added under the same name.
- header(String, String) - Method in class com.shri.restinpeace.mock.MockResponse
-
Adds a response header.
- HEADER - Enum constant in enum com.shri.restinpeace.constant.HTTPRequestParam
-
Bound via
@HeaderParam. - HeaderInterceptor - Class in com.shri.restinpeace.interceptor
-
Pre-built interceptor that injects one or more headers into every request - the common "attach an auth token (or a batch of fixed headers) to every call" use case.
- HeaderInterceptor(String, String) - Constructor for class com.shri.restinpeace.interceptor.HeaderInterceptor
-
Injects a single header with a static value.
- HeaderInterceptor(String, Supplier<String>) - Constructor for class com.shri.restinpeace.interceptor.HeaderInterceptor
-
Injects a single header whose value is re-evaluated for each request.
- HeaderInterceptor(Map<String, Supplier<String>>) - Constructor for class com.shri.restinpeace.interceptor.HeaderInterceptor
-
Injects several headers, each re-evaluated for every request.
- HeaderMap - Annotation Type in com.shri.restinpeace.annotation.request
-
Sets an HTTP header for each entry of the annotated
Map<String, ?>parameter, for a set of headers whose names aren't known until runtime - e.g. caller-supplied headers in a multi-tenant app. - HeaderParam - Annotation Type in com.shri.restinpeace.annotation.request
-
Sets an HTTP header on the request from the annotated parameter's value.
- headers() - Method in class com.shri.restinpeace.internal.PaginationRequestImpl
- Headers - Annotation Type in com.shri.restinpeace.annotation.request
-
Sets one or more fixed HTTP headers on every call of the annotated method, each given as a
"Name: Value"string - for a header whose value is always the same (e.g. - HTTPMethod - Enum in com.shri.restinpeace.constant
-
The HTTP methods supported by REST-in-peace's method annotations.
- HTTPMethodMarker - Annotation Type in com.shri.restinpeace.annotation.method.meta
-
Internal meta-annotation applied to each HTTP-verb annotation (e.g.
- HTTPRequestParam - Enum in com.shri.restinpeace.constant
-
The kinds of request parameter binding supported by REST-in-peace's parameter annotations.
- HTTPRequestParamMarker - Annotation Type in com.shri.restinpeace.annotation.method.meta
-
Internal meta-annotation applied to each request-parameter annotation (e.g.
I
- ID_ATTRIBUTE - Static variable in class com.shri.restinpeace.interceptor.CorrelationIdInterceptor
-
RequestContextattribute key the generated ID is stashed under. - idempotent() - Element in annotation type com.shri.restinpeace.annotation.retry.Retry
-
If true, sends an
Idempotency-Keyheader - one randomly generated value per call, held identical across every retry attempt of that call (never regenerated between attempts, never shared with any other call) - the standard way (Stripe, PayPal, Adyen, Square) to let a server tell a genuine retry of the same request apart from a new one. - idempotent(boolean) - Method in class com.shri.restinpeace.RetryConfig.Builder
-
Sets whether to send a stable
Idempotency-Key. - INCREMENT_BY_ONE - Enum constant in enum com.shri.restinpeace.annotation.pagination.PaginationAdvance
-
Advance the page number by one each fetch.
- INCREMENT_BY_PAGE_SIZE - Enum constant in enum com.shri.restinpeace.annotation.pagination.PaginationAdvance
-
Advance the offset by
pageSizeeach fetch. - InMemoryCache - Class in com.shri.restinpeace.cache
-
The default
Cacheimplementation: an unbounded, process-localConcurrentHashMap- fine for most single-process uses, but not shared across JVMs. - InMemoryCache() - Constructor for class com.shri.restinpeace.cache.InMemoryCache
-
Creates a cache with no time-based eviction at all - an entry lives until explicitly
InMemoryCache.evict(java.lang.String)ed/InMemoryCache.clear()ed, no matter how long ago it was stored. - InMemoryCache(long) - Constructor for class com.shri.restinpeace.cache.InMemoryCache
-
Creates a cache that also automatically forgets an entry once it's been held for longer than
maxEntryAgeMillis, checked lazily on the nextInMemoryCache.get(java.lang.String)for that same key (there's no background thread sweeping every entry proactively, so a key that's stored once and never looked up again still isn't reclaimed until this cache itself is discarded - the same "forever, unless something touches it again" limitation the unbounded default already has, just with a smaller blast radius). - interceptors(List<RequestInterceptor>) - Method in class com.shri.restinpeace.RipClientConfig.Builder
-
Sets this client's own interceptors, run in addition to (not instead of) every globally registered
interceptor- for a concern specific to this one client (e.g. this service's own auth scheme) instead of every call RIP ever makes. - invoke(Object, Method, Object[]) - Method in class com.shri.restinpeace.proxy.RestClientInvocationHandler
- is(int) - Method in exception com.shri.restinpeace.exception.RestInPeaceHttpException
-
Whether the response's status is exactly
status- a shorthand forgetStatus() == statusat a call site (e.g. - isClientError() - Method in exception com.shri.restinpeace.exception.RestInPeaceHttpException
-
Whether the response's status is in the
4xxrange - the request itself was the problem (bad input, missing auth, not found), as opposed toRestInPeaceHttpException.isServerError(). - isFresh() - Method in class com.shri.restinpeace.cache.CachedResponse
-
Whether this entry can still be served without revalidating against the origin server.
- isIdempotent() - Method in class com.shri.restinpeace.RetryConfig
-
Returns whether a stable
Idempotency-Keyis sent. - isRedirect() - Method in exception com.shri.restinpeace.exception.RestInPeaceHttpException
-
Whether the response's status is in the
3xxrange. - isServerError() - Method in exception com.shri.restinpeace.exception.RestInPeaceHttpException
-
Whether the response's status is in the
5xxrange - the server itself failed, as opposed toRestInPeaceHttpException.isClientError(). - isWithinStaleWhileRevalidateWindow() - Method in class com.shri.restinpeace.cache.CachedResponse
-
Whether this entry is stale (
CachedResponse.isFresh()isfalse) but still within itsstale-while-revalidatewindow - safe to serve immediately while a background revalidation refreshes it, rather than blocking the caller on a synchronous revalidation round trip. - ITEM_FIELD - Enum constant in enum com.shri.restinpeace.annotation.pagination.PaginationSignalSource
-
Derived from the last fetched item, for
pointerSourceonly. - items() - Method in interface com.shri.restinpeace.Page
-
Returns this page's decoded items, in the order the server returned them.
- items() - Method in interface com.shri.restinpeace.PaginationContext
-
Returns this page's decoded items, in the order the server returned them.
- itemsFetchedSoFar() - Method in interface com.shri.restinpeace.PaginationContext
-
Returns how many items have been fetched so far, including this page's.
- itemsField() - Element in annotation type com.shri.restinpeace.annotation.pagination.Paginated
-
Dotted path to the items array within the response body; empty means the response body itself is the array (no wrapper object).
J
- jitterFactor() - Element in annotation type com.shri.restinpeace.annotation.retry.Retry
-
Randomizes each computed delay (not one taken from a
Retry-Afterheader, which is already an explicit server instruction) by up to this fraction in either direction, so that many callers who all started retrying at the same moment - e.g. every replica of a horizontally-scaled service hitting the same downstream - don't retry in exact lockstep. - jitterFactor(double) - Method in class com.shri.restinpeace.RetryConfig.Builder
-
Sets the jitter fraction applied to each computed delay.
- json(Object) - Static method in class com.shri.restinpeace.mock.MockResponse
-
A
200 OKresponse, serializingbodywith the same UnirestObjectMapperRIP itself delegates to (the oneRIP.setObjectMapper(kong.unirest.ObjectMapper)sets) - so a test can hand this a plain object instead of hand-writing a JSON string.
K
- key(HTTPMethod, String) - Static method in interface com.shri.restinpeace.cache.Cache
-
Computes the cache key RIP itself uses internally for a call to
url- the same formulaget/put/evictare keyed by for that exact call, so this is the value to pass toevict(java.lang.String)to manually invalidate one specific cached response.
L
- LoggingInterceptor - Class in com.shri.restinpeace.interceptor
-
Pre-built interceptor that logs a line before a request goes out and another when its response comes back, including the elapsed time.
- LoggingInterceptor() - Constructor for class com.shri.restinpeace.interceptor.LoggingInterceptor
-
Logs to
System.out. - LoggingInterceptor(Consumer<String>) - Constructor for class com.shri.restinpeace.interceptor.LoggingInterceptor
-
Logs to a custom sink instead of
System.out.
M
- main(String[]) - Static method in class com.shri.restinpeace.codegen.OpenApiClientGenerator
-
Command-line entry point:
specFile outputDirectory packageName interfaceName. - markNoCache(RequestContext) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
Marks the current call as never cacheable, regardless of any
Cacheconfigured for its client - the generated-code counterpart of the reflective path's own@NoCachecheck. - maxConcurrentCalls(int) - Method in class com.shri.restinpeace.BulkheadConfig.Builder
-
Sets the concurrency cap.
- maxWaitDuration(Duration) - Method in class com.shri.restinpeace.BulkheadConfig.Builder
-
Sets how long a call waits for a free permit before being refused with a
BulkheadFullException- a queueing tolerance for a bursty caller (see the high-fan-out async persona in the design doc) rather than the fail-fast default, where every permit already being held immediately refuses the call. - MetricsInterceptor - Class in com.shri.restinpeace.interceptor
-
Pre-built interceptor that times every request and reports it, once its response comes back, to a
MetricsSink- the metrics counterpart ofLoggingInterceptor, following the exact same "bring your own sink" shape so RIP doesn't have to depend on Micrometer or any other metrics library to support one. - MetricsInterceptor(MetricsSink) - Constructor for class com.shri.restinpeace.interceptor.MetricsInterceptor
-
Reports each call's metrics to the given sink.
- MetricsSink - Interface in com.shri.restinpeace.interceptor
-
Receives one completed call's metrics from
MetricsInterceptor- implement this to route them into Micrometer, a homegrown registry, or anything else, without RIP itself depending on a metrics library. - minimumNumberOfCalls(int) - Method in class com.shri.restinpeace.CircuitBreakerConfig.Builder
-
Sets the minimum number of calls that must be in the window before a failure rate is ever evaluated, so the breaker never trips off a statistically meaningless sample (e.g. 1 failure out of 2 calls is technically 50%, but shouldn't trip a breaker tuned for a 20-call window).
- MockResponse - Class in com.shri.restinpeace.mock
-
A canned response for
MockRestServerto send back for a matching request. - MockRestServer - Class in com.shri.restinpeace.mock
-
A real, local HTTP server for unit-testing code that calls a
@RestClientinterface, without depending on a real network - pointRIP.getClient(Class, String)atMockRestServer.baseUrl()and this server stands in for the real one. - MockRestServerExtension - Class in com.shri.restinpeace.mock
-
A JUnit 5 extension that starts one
MockRestServerfor a whole test class andresetsit before each test - register it with@ExtendWithand receive the server as a test (or@BeforeEach) method parameter, instead of wiring up@BeforeAll/@AfterAll/@BeforeEachboilerplate by hand. - MockRestServerExtension() - Constructor for class com.shri.restinpeace.mock.MockRestServerExtension
-
Creates the extension - register it via
@ExtendWith, it needs no arguments. - Multipart - Annotation Type in com.shri.restinpeace.annotation.request
N
- name() - Element in annotation type com.shri.restinpeace.annotation.marker.RestClient
-
This client's name, read only by the optional
rest-in-peace-spring-boot-startermodule - as withRestClient.baseUrlProperty(), inert metadata for every other consumer. - negativeCacheTtlMillis(long) - Method in class com.shri.restinpeace.RipClientConfig.Builder
-
Opts this client into negatively caching a confirmed
404, overriding the shared default set viaRIP.setNegativeCacheTtlMillis(long)for this client only - so a client that already asked once for a resource that doesn't exist stops hammering the downstream asking again, forttlMillis- regardless of whether the404response itself carries anyCache-Control/ETag/Last-Modifiedat all (unlike every other cached status, which is only ever stored when the server's own headers say so). - next() - Method in interface com.shri.restinpeace.Page
-
Blocking-fetches the next page by re-invoking the exact same annotated method through the client's entire existing call pipeline - retry, cache, circuit breaker, bulkhead, and every registered interceptor - exactly as if the method were called again by hand (§6.9).
- nextRequest(PaginationContext<T>) - Method in interface com.shri.restinpeace.PaginationStrategy
-
Consulted after every page fetch, including the first, to decide whether to continue and what the next request should look like.
- NoCache - Annotation Type in com.shri.restinpeace.annotation.cache
-
Opts a single
GETmethod out of response caching, even when its client has aCacheconfigured (viaRipClientConfig.Builder.cacheorRIP.setCache(com.shri.restinpeace.cache.Cache)) - every call always hits the network, regardless of the response's ownCache-Control/ETagheaders. - noContent() - Static method in class com.shri.restinpeace.mock.MockResponse
-
A
204 No Contentresponse. - NONE - Enum constant in enum com.shri.restinpeace.annotation.pagination.PaginationAdvance
-
No client-driven advancement - the default, used whenever
pointerSource != NONE. - NONE - Enum constant in enum com.shri.restinpeace.annotation.pagination.PaginationSignalSource
-
No such signal - this attribute isn't used.
- NONE - Enum constant in enum com.shri.restinpeace.interceptor.RequestContext.CurlVerbosity
-
No extra flag - just the method, URL, headers, and body.
- notModified() - Static method in class com.shri.restinpeace.mock.MockResponse
-
A
304 Not Modifiedresponse, for a test simulating a cache revalidation hit - RIP's response cache sendsIf-None-Match/If-Modified-Sinceautomatically once a cachedGETentry goes stale, and expects exactly this status back to keep serving the previously-cached body instead of treating the response as a fresh one.
O
- objectMapper(ObjectMapper) - Method in class com.shri.restinpeace.RipClientConfig.Builder
-
Sets the JSON
ObjectMapperfor this client. - of(byte[], String) - Static method in class com.shri.restinpeace.multipart.PartValue
-
Wraps a
byte[]part value with an explicit file name. - of(File, String) - Static method in class com.shri.restinpeace.multipart.PartValue
-
Wraps a
Filepart value with an explicit file name. - of(InputStream, String) - Static method in class com.shri.restinpeace.multipart.PartValue
-
Wraps an
InputStreampart value with an explicit file name. - of(Map<String, String>) - Static method in class com.shri.restinpeace.interceptor.HeaderInterceptor
-
Creates an interceptor for a fixed set of static headers.
- ok(String) - Static method in class com.shri.restinpeace.interceptor.ShortCircuitResponse
-
A
200 OKresponse with a body. - ok(String) - Static method in class com.shri.restinpeace.mock.MockResponse
-
A
200 OKresponse with a body, defaultingContent-Typetoapplication/json- override viaMockResponse.header(java.lang.String, java.lang.String)for a plain-text/other body. - on(HTTPMethod, String, MockResponse) - Method in class com.shri.restinpeace.mock.MockRestServer
-
Registers a response for every request matching
httpMethodandpathTemplate- unlikeMockRestServer.enqueue(com.shri.restinpeace.mock.MockResponse), this doesn't get consumed; it keeps answering every matching request the same way. - on(HTTPMethod, String, Predicate<RecordedRequest>, MockResponse) - Method in class com.shri.restinpeace.mock.MockRestServer
-
Same as
MockRestServer.on(HTTPMethod, String, MockResponse), but only matches a request for whichmatcheralso returnstrue- for matching on a request header or the request body, neither of which therequiredQueryParamsoverload covers, e.g. - on(HTTPMethod, String, Map<String, String>, MockResponse) - Method in class com.shri.restinpeace.mock.MockRestServer
-
Same as
MockRestServer.on(HTTPMethod, String, MockResponse), but only matches a request whose query params contain every entry inrequiredQueryParamswith an equal value - any other query params the request carries are ignored. - onComplete() - Method in interface com.shri.restinpeace.BulkheadProvider
-
Called once a permitted call completes, successfully or not.
- onError(long, Throwable) - Method in interface com.shri.restinpeace.CircuitBreakerProvider
-
Called once a permitted call fails at the transport level (a connection refused, a timeout - no response at all).
- onFlaky(HTTPMethod, String, int, MockResponse, MockResponse) - Method in class com.shri.restinpeace.mock.MockRestServer
-
Registers a route that fails
failuresBeforeSuccesstimes withfailureResponsebefore settling intosuccessResponsefor every request after that - sugar for callingMockRestServer.on(HTTPMethod, String, MockResponse)withsuccessResponseand thenMockRestServer.enqueueFor(com.shri.restinpeace.constant.HTTPMethod, java.lang.String, com.shri.restinpeace.mock.MockResponse)withfailureResponsefailuresBeforeSuccesstimes. - onPages(HTTPMethod, String, MockResponse...) - Method in class com.shri.restinpeace.mock.MockRestServer
-
Scripts an ordered sequence of responses for a route - the 1st matching request gets
responses[0], the 2nd getsresponses[1], and so on, with the last response answering every request after the sequence is exhausted. - onPages(HTTPMethod, String, Map<String, String>, MockResponse...) - Method in class com.shri.restinpeace.mock.MockRestServer
-
Same as
MockRestServer.onPages(HTTPMethod, String, MockResponse...), but only matches a request whose query params contain every entry inrequiredQueryParams- for a path also serving other, non-paginated traffic that a bareMockRestServer.onPages(HTTPMethod, String, MockResponse...)route would otherwise intercept too. - onProgress(long, long) - Method in interface com.shri.restinpeace.download.DownloadProgressListener
-
Called as the response body streams in.
- onProgress(String, long, long) - Method in interface com.shri.restinpeace.upload.UploadProgressListener
-
Called as one
File/InputStreampart is written. - onSuccess(long, int) - Method in interface com.shri.restinpeace.CircuitBreakerProvider
-
Called once a permitted call completes with an actual HTTP response - any status code, since RIP itself makes no assumption about what an external breaker considers a failure.
- OpenApiClientGenerator - Class in com.shri.restinpeace.codegen
-
Generates a
@RestClientinterface (annotations and all) from an OpenAPI 3.x document - the opposite direction of this library's own compile-time proxy generation, which turns a hand-written interface into an implementation. - OPTIONS - Enum constant in enum com.shri.restinpeace.constant.HTTPMethod
-
HTTP OPTIONS.
- OPTIONS - Annotation Type in com.shri.restinpeace.annotation.method
-
Marks a method as issuing an HTTP OPTIONS request to the given URL template.
P
- Page<T> - Interface in com.shri.restinpeace
-
One page of a
@Paginated(orPaginationStrategy<T>) method's results, for manual, page-at-a-time iteration - seedocs/design/pagination-helper.md§6.4. - pagesFetchedSoFar() - Method in interface com.shri.restinpeace.PaginationContext
-
Returns how many pages have been fetched so far, including this one.
- pageSize() - Element in annotation type com.shri.restinpeace.annotation.pagination.Paginated
-
The page size
PaginationAdvance.INCREMENT_BY_PAGE_SIZEadvances the offset by, and - absent any other termination signal - compares against the fetched item count to detect a short (final) page. - Paginated - Annotation Type in com.shri.restinpeace.annotation.pagination
-
Declares that a method's response is paginated - following a next-page pointer automatically, extracting each page's items into a
Page<T>, instead of leaving the fetch-extract-repeat loop to hand-written code. - PaginatedCallAdapter<T> - Interface in com.shri.restinpeace
-
Adapts a
@Paginatedmethod's page sequence into a consumer-chosen return typeT- the pagination-aware counterpart ofCallAdapter, for a return type built around fetching more than one page over time (e.g. - PaginatedCallAdapterFactory - Interface in com.shri.restinpeace
-
Recognizes a
@Paginatedmethod's return type and produces aPaginatedCallAdapterfor it - the pagination-aware counterpart ofCallAdapterFactory, consulted only for a method actually annotated@Paginated(never for aPaginationStrategy<T>-parameter method, and never for a plain, non-paginated call - seeCallAdapterFactoryfor that). - PaginationAdvance - Enum in com.shri.restinpeace.annotation.pagination
-
How the client advances to the next page on its own, when
pointerSource = NONE(no server-given pointer at all) - offset or page-number arithmetic instead of following an extracted value. - PaginationContext<T> - Interface in com.shri.restinpeace
-
The single page's items and metadata a
PaginationStrategyis consulted with after every fetch - seedocs/design/pagination-helper.md§6.8. - PaginationCursor - Annotation Type in com.shri.restinpeace.annotation.pagination
-
Marks a parameter - already annotated
@QueryParam/@PathParam/@HeaderParam/@Body- as the carrier a@Paginatedfetch re-populates with the freshly extracted next-page pointer before every subsequent call. - PaginationRequest - Interface in com.shri.restinpeace
-
What a
PaginationStrategy's next request should look like - built exclusively via the static factory methods below (this interface isn't meant to be implemented directly), and combinable viaPaginationRequest.and(com.shri.restinpeace.PaginationRequest)when more than one override applies at once (a composite keyset needing two request-body fields set, for instance). - PaginationRequestImpl - Class in com.shri.restinpeace.internal
-
The sole implementation of
PaginationRequest- constructed only via its static factory methods (which this class's own statics back) andPaginationRequestImpl.and(com.shri.restinpeace.PaginationRequest). - PaginationSignalSource - Enum in com.shri.restinpeace.annotation.pagination
-
Where one particular
@Paginatedsignal comes from - reused acrosspointerSource,hasMoreSource,totalSource, andtotalPagesSource(one enum, four uses, not four renamed near-duplicates) perdocs/design/pagination-helper.md§6.1. - PaginationStrategy<T> - Interface in com.shri.restinpeace
-
The programmatic escape hatch for a pagination shape
@Paginated's closed annotation vocabulary can't express - seedocs/design/pagination-helper.md§6.8 and §10 for exactly which cases require it. - Part - Annotation Type in com.shri.restinpeace.annotation.request
-
One field of a
@Multipartmethod's multipart body. - PartMap - Annotation Type in com.shri.restinpeace.annotation.request
-
A
Map<String, ?>parameter of a@Multipartmethod adding one part per entry, for a set of field names not known until runtime - the@Partcounterpart to@QueryMapand@HeaderMap. - PartValue - Class in com.shri.restinpeace.multipart
-
Wraps a
File,byte[], orInputStreamwith an explicit file name, for use as a@PartMapentry's value when the default file name (the entry's key) isn't the one to send. - PATCH - Enum constant in enum com.shri.restinpeace.constant.HTTPMethod
-
HTTP PATCH.
- PATCH - Annotation Type in com.shri.restinpeace.annotation.method
-
Marks a method as issuing an HTTP PATCH request to the given URL template.
- PATH - Enum constant in enum com.shri.restinpeace.constant.HTTPRequestParam
-
Bound via
@PathParam. - PathParam - Annotation Type in com.shri.restinpeace.annotation.request
-
Substitutes a
{name}placeholder in the method's URL template with the annotated parameter's value. - pathParams() - Method in class com.shri.restinpeace.internal.PaginationRequestImpl
- permittedCallsInHalfOpenState(int) - Method in class com.shri.restinpeace.CircuitBreakerConfig.Builder
-
Sets how many trial calls are let through while half-open, once the open-state cooldown elapses, before deciding whether to close (recovered) or re-open (still failing) based on their own failure rate.
- pointerField() - Element in annotation type com.shri.restinpeace.annotation.pagination.Paginated
-
Where the pointer is read from within that source: a dotted body path, a header name, or - for
PaginationSignalSource.ITEM_FIELDkeyset pagination - a comma-separated list of item field names for an N-way composite key. - pointerKind() - Element in annotation type com.shri.restinpeace.annotation.pagination.Paginated
-
Whether the extracted pointer is a complete URL or a bare value to resend via a
@PaginationCursorcarrier. - PointerKind - Enum in com.shri.restinpeace.annotation.pagination
-
Whether a
@Paginatedmethod's extracted next-page pointer is a complete URL to follow verbatim, or a bare value to re-inject into the next request via a@PaginationCursorcarrier. - pointerSource() - Element in annotation type com.shri.restinpeace.annotation.pagination.Paginated
-
Where the next-page pointer is read from.
- POST - Enum constant in enum com.shri.restinpeace.constant.HTTPMethod
-
HTTP POST.
- POST - Annotation Type in com.shri.restinpeace.annotation.method
-
Marks a method as issuing an HTTP POST request to the given URL template.
- process(Set<? extends TypeElement>, RoundEnvironment) - Method in class com.shri.restinpeace.processor.RestClientProcessor
- processRestRequest(Method, HTTPMethod, Object[]) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
Executes the given
@RestClientmethod call and returns its result. - proxy(String, int) - Method in class com.shri.restinpeace.RipClientConfig.Builder
-
Sets an unauthenticated proxy.
- proxy(String, int, String, String) - Method in class com.shri.restinpeace.RipClientConfig.Builder
-
Sets an authenticated proxy.
- put(String, CachedResponse) - Method in interface com.shri.restinpeace.cache.Cache
-
Stores (or replaces) the entry for
key. - put(String, CachedResponse) - Method in class com.shri.restinpeace.cache.InMemoryCache
- PUT - Enum constant in enum com.shri.restinpeace.constant.HTTPMethod
-
HTTP PUT.
- PUT - Annotation Type in com.shri.restinpeace.annotation.method
-
Marks a method as issuing an HTTP PUT request to the given URL template.
Q
- QUERY - Enum constant in enum com.shri.restinpeace.constant.HTTPRequestParam
-
Bound via
@QueryParam. - QueryMap - Annotation Type in com.shri.restinpeace.annotation.request
-
Appends a query string parameter for each entry of the annotated
Map<String, ?>parameter, for a set of query params whose names aren't known until runtime - e.g. a search endpoint's open-ended filter set. - QueryParam - Annotation Type in com.shri.restinpeace.annotation.request
-
Appends a query string parameter to the request from the annotated parameter's value.
- queryParams() - Method in class com.shri.restinpeace.internal.PaginationRequestImpl
R
- rawBody() - Method in interface com.shri.restinpeace.PaginationContext
-
Returns this page's parsed response body, for arbitrary field access the closed
@Paginatedattribute vocabulary can't reach (a cursor needing decoding before reuse, combined termination logic across multiple signals, and the other cases catalogued in §10). - rawResponse() - Method in interface com.shri.restinpeace.Page
-
Returns the status code and headers of the call that produced this page - correct for whichever page is currently held, unlike a
RipResponse<Page<T>>would be afterPage.next()advances (see §6.4.1). - readMillis() - Element in annotation type com.shri.restinpeace.annotation.timeout.Timeout
-
The read (socket) timeout in milliseconds, or
-1(the default) to leave the read timeout at whatever it would otherwise be. - readTimeoutMillis(int) - Method in class com.shri.restinpeace.RipClientConfig.Builder
-
Sets the read (socket) timeout.
- recordCall(String, String, int, long) - Method in interface com.shri.restinpeace.interceptor.MetricsSink
-
Called once per completed call, right after its response comes back.
- RecordedRequest - Class in com.shri.restinpeace.mock
-
A single request
MockRestServeractually received, for a test to assert against after making a call through a@RestClientinterface. - RecordedRequest.Part - Class in com.shri.restinpeace.mock
-
One part of a decoded
multipart/form-datarequest body, as returned byRecordedRequest.getParts(). - recordFailureForStatus(IntPredicate) - Method in class com.shri.restinpeace.CircuitBreakerConfig.Builder
-
Sets which HTTP status codes count as a breaker failure - a genuine downstream failure (5xx, the default), not an application-level expected outcome (e.g. a
404from an existence check, the same kind of outcome negative caching already treats as a valid answer rather than an error). - RedactingLoggingInterceptor - Class in com.shri.restinpeace.interceptor
-
A
LoggingInterceptor-style pre-built interceptor that also logs the request and response bodies, masking a configured set of field names (case-insensitively) instead of printing them verbatim - so logging bodies is safe by default instead of a footgun. - RedactingLoggingInterceptor() - Constructor for class com.shri.restinpeace.interceptor.RedactingLoggingInterceptor
-
Logs to
System.out, maskingRedactingLoggingInterceptor.DEFAULT_SENSITIVE_FIELD_NAMES. - RedactingLoggingInterceptor(Set<String>) - Constructor for class com.shri.restinpeace.interceptor.RedactingLoggingInterceptor
-
Logs to
System.out, masking a custom set of field names instead ofRedactingLoggingInterceptor.DEFAULT_SENSITIVE_FIELD_NAMES. - RedactingLoggingInterceptor(Set<String>, Consumer<String>) - Constructor for class com.shri.restinpeace.interceptor.RedactingLoggingInterceptor
-
Logs to a custom sink instead of
System.out, masking a custom set of field names. - ReflectiveRestClientValidator - Class in com.shri.restinpeace.validator
-
Validates a
@RestClientinterface beforeRIP.getClient(Class)hands back a proxy for it, so a misconfigured interface fails fast with a complete list of problems instead of failing later on the first call. - remove(HTTPMethod, String) - Method in class com.shri.restinpeace.mock.MockRestServer
-
Removes a route registered via
MockRestServer.on(HTTPMethod, String, MockResponse), so a later request to that path falls through to any other registered route, theMockRestServer.enqueue(com.shri.restinpeace.mock.MockResponse)queue, or the default "no response was queued or registered" failure - without a fullMockRestServer.reset(), which would also wipe every other route, the queue, and recorded-request history. - remove(HTTPMethod, String, Map<String, String>) - Method in class com.shri.restinpeace.mock.MockRestServer
-
Same as
MockRestServer.remove(HTTPMethod, String), for a route registered viaMockRestServer.on(HTTPMethod, String, Map, MockResponse)with the samerequiredQueryParams. - removeCallAdapterFactory(CallAdapterFactory) - Static method in class com.shri.restinpeace.internal.RequestExecutor
-
Removes one previously registered
CallAdapterFactoryby identity, notequals- seeRequestExecutor.addCallAdapterFactory(com.shri.restinpeace.CallAdapterFactory)'s own reasoning for why. - removeCallAdapterFactory(CallAdapterFactory) - Static method in class com.shri.restinpeace.RIP
-
Removes one previously registered global
CallAdapterFactoryby identity; a no-op if it was never registered (or already removed). - removeInterceptor(RequestInterceptor) - Static method in class com.shri.restinpeace.internal.RequestExecutor
-
Removes one previously registered global interceptor by identity.
- removeInterceptor(RequestInterceptor) - Static method in class com.shri.restinpeace.RIP
-
Removes one previously registered global interceptor by identity, leaving every other registered interceptor - including other instances of the same class - untouched.
- removePaginatedCallAdapterFactory(PaginatedCallAdapterFactory) - Static method in class com.shri.restinpeace.internal.RequestExecutor
-
Removes one previously registered
PaginatedCallAdapterFactoryby identity. - removePaginatedCallAdapterFactory(PaginatedCallAdapterFactory) - Static method in class com.shri.restinpeace.RIP
-
Removes one previously registered global
PaginatedCallAdapterFactoryby identity; a no-op if it was never registered (or already removed). - reportUnhitRoutes() - Method in class com.shri.restinpeace.mock.MockRestServerExtension
-
Opts into printing every unhit route to
System.erratafterAll- see this class's own javadoc for why this only takes effect with thestatic @RegisterExtensionfield style. - RequestContext - Class in com.shri.restinpeace.interceptor
-
Per-call state passed to a
RequestInterceptor'sbeforeRequest/afterResponse, sharing one instance across both so an interceptor can correlate state between them (e.g. a start timestamp for measuring request duration, viaRequestContext.setAttribute(java.lang.String, java.lang.Object)). - RequestContext(HTTPMethod, String) - Constructor for class com.shri.restinpeace.interceptor.RequestContext
-
Creates the context for a single call.
- RequestContext.CurlVerbosity - Enum in com.shri.restinpeace.interceptor
-
How much extra diagnostic detail
RequestContext.toCurlCommand(CurlVerbosity)askscurlitself to print, viacurl's own flags - RIP doesn't invent its own verbosity scheme, it just picks which standardcurlflag(s) to include. - requestCount() - Method in class com.shri.restinpeace.mock.MockRestServer
-
Returns how many requests have been recorded so far.
- RequestExecutor - Class in com.shri.restinpeace.internal
-
Builds and executes the actual HTTP request for a
@RestClientmethod call, applying path/query/header/body parameters and registeredRequestInterceptors. - RequestExecutor() - Constructor for class com.shri.restinpeace.internal.RequestExecutor
-
Creates a processor with no runtime base URL override.
- RequestExecutor(RipClientConfig) - Constructor for class com.shri.restinpeace.internal.RequestExecutor
-
Creates a processor from a
RipClientConfig. - RequestExecutor(String) - Constructor for class com.shri.restinpeace.internal.RequestExecutor
-
Creates a processor that resolves every relative method URL against
baseUrlOverrideinstead of the interface's@BaseUrl, for a base URL that's only known at runtime (e.g. per deployment environment). - RequestInterceptor - Interface in com.shri.restinpeace.interceptor
-
Global hook into every request/response made through RIP, registered via
RIP.addInterceptor(RequestInterceptor). - required() - Element in annotation type com.shri.restinpeace.annotation.request.Field
- required() - Element in annotation type com.shri.restinpeace.annotation.request.HeaderParam
-
If true, a
nullargument with noHeaderParam.defaultValue()throws aRestInPeaceExceptionat call time. - required() - Element in annotation type com.shri.restinpeace.annotation.request.Part
- required() - Element in annotation type com.shri.restinpeace.annotation.request.QueryParam
-
If true, a
nullargument with noQueryParam.defaultValue()throws aRestInPeaceExceptionat call time. - requireUrlParam(Object, String) - Static method in class com.shri.restinpeace.internal.RequestExecutor
-
The generated-code counterpart of a method annotated
@Url:valueused verbatim as the request URL, bypassingRequestExecutor.resolveGeneratedUrl(java.lang.String, java.lang.String, java.lang.String[], java.lang.Object[])(and everything it would otherwise resolve -@BaseUrl, a runtime base URL,@PathParam) entirely, mirroringUrlResolver's ownresolveUrlParam. - reset() - Method in class com.shri.restinpeace.mock.MockRestServer
-
Clears every queued response, registered route, and recorded request, so the same server can be reused across multiple tests instead of paying to start a new one for each - e.g. from a
@BeforeEachmethod, with the server itself started once in a@BeforeAll. - resolveCallAdapter(Method) - Static method in class com.shri.restinpeace.internal.RequestExecutor
-
Consults every registered
CallAdapterFactory, in registration order, returning the first non-empty answer - seeCallAdapterFactory.get(Method). - resolveGeneratedUrl(String, String, String[], Object[]) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
Resolves a generated method's request URL from its (possibly relative) URL template, substituting
@PathParams - the generated-code counterpart ofUrlResolver's ownresolveUrl, used when the method has no@Urlparameter (which bypasses this entirely; seeRequestExecutor.requireUrlParam(java.lang.Object, java.lang.String)). - resolvePaginatedCallAdapter(Method) - Static method in class com.shri.restinpeace.internal.RequestExecutor
-
Consults every registered
PaginatedCallAdapterFactory, in registration order, returning the first non-empty answer - the pagination-aware counterpart ofRequestExecutor.resolveCallAdapter(java.lang.reflect.Method). - resolveParameter(ParameterContext, ExtensionContext) - Method in class com.shri.restinpeace.mock.MockRestServerExtension
- resolveValue(Object, boolean, String, String) - Method in class com.shri.restinpeace.internal.RequestExecutor
-
Applies a query param or header value that has
@QueryParam/@HeaderParam'srequired/defaultValuesemantics - shared by the reflective path'sRequestExecutor.applyParams(kong.unirest.HttpRequest<?>, java.lang.reflect.Method, java.lang.Object[], com.shri.restinpeace.interceptor.RequestContext)and generated code, which calls this directly then applies the result itself (RequestExecutor.applyQueryValue(kong.unirest.HttpRequest<?>, java.lang.String, java.lang.Object)for a query param;request.headerReplace(name, String.valueOf(value))- a plain public Unirest call - for a header param, so no separate "generated header param" method is needed). - RESPONSE_BODY - Enum constant in enum com.shri.restinpeace.annotation.pagination.PaginationSignalSource
-
Read from the (possibly nested) response body.
- RESPONSE_HEADER - Enum constant in enum com.shri.restinpeace.annotation.pagination.PaginationSignalSource
-
Read from a response header.
- responseBodyType() - Method in interface com.shri.restinpeace.CallAdapter
-
The type to decode the HTTP response body into - what
Titself wraps (e.g. for aMono<User>adapter, this returnsUser.class; forMono<RipResponse<User>>, this returns aRipResponse<User>parameterized type), the same roleRipResponse's own inner-type resolution already plays for that return type. - RestClient - Annotation Type in com.shri.restinpeace.annotation.marker
-
Marks an interface as a REST client whose methods declare HTTP calls via
@GET/@POST/etc. - RestClientInvocationHandler - Class in com.shri.restinpeace.proxy
-
JDK dynamic proxy handler backing every client returned by
RIP.getClient(Class). - RestClientInvocationHandler() - Constructor for class com.shri.restinpeace.proxy.RestClientInvocationHandler
-
Creates a handler backed by a fresh
RequestExecutorwith no runtime base URL override. - RestClientInvocationHandler(RequestExecutor) - Constructor for class com.shri.restinpeace.proxy.RestClientInvocationHandler
-
Creates a handler backed by an already-built
RequestExecutor, instead of constructing a fresh one from a base URL or config - used by a compile-time-generated<Interface>_RipImplclass to build its own internal reflective fallback proxy (for the one method, if any, outsideRestClientProcessor's codegen-supported shape) that shares this exact client's retry/cache/interceptor/timeout config, rather than one built from scratch with none of it. - RestClientInvocationHandler(RipClientConfig) - Constructor for class com.shri.restinpeace.proxy.RestClientInvocationHandler
-
Creates a handler backed by a fresh
RequestExecutorbuilt fromconfig. - RestClientInvocationHandler(String) - Constructor for class com.shri.restinpeace.proxy.RestClientInvocationHandler
-
Creates a handler backed by a fresh
RequestExecutorthat resolves every relative method URL againstbaseUrlOverride. - RestClientProcessor - Class in com.shri.restinpeace.processor
-
Generates a compile-time implementation (
<Interface>_RipImpl) of every@RestClientinterface with at least one method that falls within the currently-supported shape: a single fixed HTTP verb,@PathParam/@QueryParam/@HeaderParam/@QueryMap/@HeaderMap/@Body/@Url/@Part/@PartMap/@Field/@FieldMap/@Destination/anUploadProgressListener/DownloadProgressListenerparameter, optional@Timeout/@Retry/@Headers/@ErrorType/@Multipart/@FormUrlEncoded, and avoid,String, non-generic POJO,byte[],File, orRipResponse<T>(for any of the previous return-type shapes) return type. - RestClientProcessor() - Constructor for class com.shri.restinpeace.processor.RestClientProcessor
-
Instantiated reflectively by the annotation-processing tool via its
META-INF/servicesSPI registration. - RestInPeaceException - Exception in com.shri.restinpeace.exception
-
Unchecked exception thrown for any REST-in-peace runtime error - a
@RestClientinterface missing@RestClientor failing validation (seeRestInPeaceValidationExceptionfor the underlying validation errors), a missing required parameter value, or an unsupported HTTP method/annotation combination. - RestInPeaceException() - Constructor for exception com.shri.restinpeace.exception.RestInPeaceException
-
Creates an exception with no message or cause.
- RestInPeaceException(String) - Constructor for exception com.shri.restinpeace.exception.RestInPeaceException
-
Creates an exception with a message.
- RestInPeaceException(String, Throwable) - Constructor for exception com.shri.restinpeace.exception.RestInPeaceException
-
Creates an exception with a message and cause.
- RestInPeaceException(Throwable) - Constructor for exception com.shri.restinpeace.exception.RestInPeaceException
-
Creates an exception with a cause.
- RestInPeaceHttpException - Exception in com.shri.restinpeace.exception
-
Unchecked exception thrown when a
@RestClientmethod's response has a non-2xx HTTP status - the request reached the server and got a response, it's just not a success. - RestInPeaceHttpException(int, String, Object) - Constructor for exception com.shri.restinpeace.exception.RestInPeaceHttpException
-
Creates the exception for a failed response with no
Retry-Afterheader to parse. - RestInPeaceHttpException(int, String, Object, Long) - Constructor for exception com.shri.restinpeace.exception.RestInPeaceHttpException
-
Creates the exception for a failed response.
- RestInPeaceValidationException - Exception in com.shri.restinpeace.exception
-
Checked exception thrown by
ReflectiveRestClientValidator.validate(Class)when a@RestClientinterface fails validation. - RestInPeaceValidationException(ValidationResult) - Constructor for exception com.shri.restinpeace.exception.RestInPeaceValidationException
-
Creates the exception for a failed validation.
- retry(RetryConfig) - Method in class com.shri.restinpeace.RipClientConfig.Builder
-
Sets this client's default retry policy - applied to a call whose method (and interface) has no
@Retryof its own, which always wins over this when present. - Retry - Annotation Type in com.shri.restinpeace.annotation.retry
-
Re-issues a request that fails with a transport error (a connection refused, a timeout) or with one of
Retry.retryOnStatus(), up toRetry.times()attempts total, waitingRetry.delayMillis()between attempts and multiplying that wait byRetry.backoffMultiplier()after each one - unless the failed response itself carries aRetry-Afterheader, which takes priority over the computed delay for that one wait (seeRetry.delayMillis()), andRetry.jitterFactor()randomizes each computed delay to avoid many callers retrying in lockstep. - retryBudget(int, long) - Method in class com.shri.restinpeace.RipClientConfig.Builder
-
Caps the *total* number of retries this client performs across every call within a rolling window - not a per-call limit, which is still each call's own
@Retry#times()(or this config'sRipClientConfig.Builder.retry(RetryConfig)default). - RetryConfig - Class in com.shri.restinpeace
-
Per-client default retry policy for
RIP.getClient(Class, RipClientConfig)- applied to any call whose method has no@Retryof its own (and whose interface has no interface-level@Retrydefault either - see that annotation's own javadoc for the interface-level shape), for a client whose retry policy is only known at runtime instead of fixed at compile time (e.g. more aggressive retries against a known-flakier staging environment than what the interface's own@Retryannotations declare for production). - RetryConfig.Builder - Class in com.shri.restinpeace
-
Builds a
RetryConfig. - retryOnStatus() - Element in annotation type com.shri.restinpeace.annotation.retry.Retry
-
The HTTP status codes that count as a failure worth retrying.
- retryOnStatus(int...) - Method in class com.shri.restinpeace.RetryConfig.Builder
-
Sets the HTTP status codes that count as a failure worth retrying.
- RIP - Class in com.shri.restinpeace
-
Entry point for REST-in-peace: turns an annotated
@RestClientinterface into a working HTTP client backed by a JDK dynamic proxy, viaRIP.getClient(Class). - RipClientConfig - Class in com.shri.restinpeace
-
Per-client settings for
RIP.getClient(Class, RipClientConfig)- base URL, connect/read timeout, proxy, JSONObjectMapper, cache, interceptors, and a default retry policy - for a@RestClientwhose environment differs from every other client's, sincekong.unirest.Unirest's own global config is shared by every RIP client that doesn't ask for its own. - RipClientConfig.Builder - Class in com.shri.restinpeace
-
Builds a
RipClientConfig. - RIPConstants - Class in com.shri.restinpeace.constant
-
Internal shared constants used as annotation attribute defaults.
- RIPConstants() - Constructor for class com.shri.restinpeace.constant.RIPConstants
-
No-op; this class only holds constants.
- RipResponse<T> - Class in com.shri.restinpeace
-
Wraps a successful response's decoded body together with its status code and headers, for a method that needs more than just the body.
- RipResponse(int, Map<String, List<String>>, T) - Constructor for class com.shri.restinpeace.RipResponse
-
Wraps a decoded response body with its status code and headers.
S
- setAttribute(String, Object) - Method in class com.shri.restinpeace.interceptor.RequestContext
-
Lets an interceptor stash arbitrary per-call state in
beforeRequestand read it back inafterResponse(e.g. a start timestamp to compute request duration). - setBody(String) - Method in class com.shri.restinpeace.interceptor.RequestContext
-
Sets this call's request body - called internally by RIP itself, before
beforeRequestruns, for a@Bodyvalue only (@FormUrlEncoded/@Multipartbodies aren't captured here - neither has one single serialized string representation the way a JSON/raw-string@Bodydoes). - setCache(Cache) - Static method in class com.shri.restinpeace.RIP
-
Sets the shared default
Cachefor response caching, used by every client not built with aRipClientConfigthat sets its own viaRipClientConfig.Builder.cache(Cache). - setCacheKeyIncludesQueryString(boolean) - Static method in class com.shri.restinpeace.RIP
-
Sets whether the cache key includes the request's query string, for every client not built with a
RipClientConfigthat sets its own viaRipClientConfig.Builder.cacheKeyIncludesQueryString(boolean). - setDefaultCache(Cache) - Static method in class com.shri.restinpeace.internal.RequestExecutor
-
Sets the shared default cache.
- setDefaultCacheKeyIncludesQueryString(boolean) - Static method in class com.shri.restinpeace.internal.RequestExecutor
-
Sets whether the cache key includes the request's query string.
- setDefaultNegativeCacheTtlMillis(long) - Static method in class com.shri.restinpeace.internal.RequestExecutor
-
Sets the shared default negative-cache TTL.
- setNegativeCacheTtlMillis(long) - Static method in class com.shri.restinpeace.RIP
-
Sets the shared default negative-cache TTL, for every client not built with a
RipClientConfigthat sets its own viaRipClientConfig.Builder.negativeCacheTtlMillis(long). - setObjectMapper(ObjectMapper) - Static method in class com.shri.restinpeace.RIP
-
Sets the
ObjectMapperused to (de)serialize JSON request/response bodies for every client sharing the app-wide static Unirest client (i.e. - shortCircuit(RequestContext) - Method in interface com.shri.restinpeace.interceptor.RequestInterceptor
-
Called after every registered interceptor's
beforeRequesthas run (in the same FIFO registration order asbeforeRequestitself) - returning a non-nullShortCircuitResponseskips the network call entirely and uses it as this call's response instead, decoded exactly as a real one would be (including throwingRestInPeaceHttpExceptionfor a non-2xx status). - ShortCircuitResponse - Class in com.shri.restinpeace.interceptor
-
A synthetic response a
RequestInterceptor.shortCircuit(com.shri.restinpeace.interceptor.RequestContext)can hand back to skip the network call entirely - the request is never sent, and this response is decoded exactly as if it had come back from a real one (including throwingRestInPeaceHttpExceptionfor a non-2xx status, and being visible to every registered interceptor's ownafterResponse). - slidingWindowSize(int) - Method in class com.shri.restinpeace.CircuitBreakerConfig.Builder
-
Selects a count-based window of
sizecalls - the default shape. - slidingWindowSize(Duration) - Method in class com.shri.restinpeace.CircuitBreakerConfig.Builder
-
Selects a time-based window of the last
duration- for a consumer who specifically wants "rate over the last N seconds regardless of call volume" rather than the count-based default. - start() - Static method in class com.shri.restinpeace.mock.MockRestServer
-
Starts a new server on an OS-assigned loopback port.
- status(int, byte[]) - Static method in class com.shri.restinpeace.mock.MockResponse
-
A response with the given status and raw bytes, for a binary (
byte[]/File-returning) call. - status(int, String) - Static method in class com.shri.restinpeace.interceptor.ShortCircuitResponse
-
A response with an arbitrary status and body.
- status(int, String) - Static method in class com.shri.restinpeace.mock.MockResponse
-
A response with the given status and a raw body, no default headers.
- supportsParameter(ParameterContext, ExtensionContext) - Method in class com.shri.restinpeace.mock.MockRestServerExtension
T
- takeRequest() - Method in class com.shri.restinpeace.mock.MockRestServer
-
Removes and returns the oldest recorded request, for asserting against one call at a time in the order calls were made.
- TIME_BASED - Enum constant in enum com.shri.restinpeace.CircuitBreakerConfig.SlidingWindowType
-
The last
CircuitBreakerConfig.getSlidingWindowDurationMillis()of wall-clock time. - Timeout - Annotation Type in com.shri.restinpeace.annotation.timeout
-
Overrides the connect/read timeout, taking priority over both the shared client's configured default and a
RipClientConfig's timeout - for one endpoint whose expected latency doesn't match the rest of the client (a report-export endpoint that's expected to be slow, a health check that should fail fast). - times() - Element in annotation type com.shri.restinpeace.annotation.retry.Retry
-
How many attempts to make in total before giving up and returning (or throwing) the last outcome.
- times(int) - Method in class com.shri.restinpeace.RetryConfig.Builder
-
Sets the maximum number of attempts in total.
- toCurlCommand() - Method in class com.shri.restinpeace.interceptor.RequestContext
-
Renders this call as a
curlcommand reproducing it as closely as possible - the exact method, URL, headers, and body (if any) RIP is about to send - for pasting into a bug report or a terminal to reproduce a failure outside the JVM. - toCurlCommand(RequestContext.CurlVerbosity) - Method in class com.shri.restinpeace.interceptor.RequestContext
-
Same as
RequestContext.toCurlCommand(), with an extracurlflag (or flags) for the requested verbosity level - useful when the plain reproduction doesn't explain a failure and the wire-level detailcurlitself can print (request/response headers, a raw dump of everything on the wire, orcurl's own internal engine tracing) is what's actually needed. - totalField() - Element in annotation type com.shri.restinpeace.annotation.pagination.Paginated
-
Where the
Paginated.totalSource()record count is read from within that source. - totalPagesField() - Element in annotation type com.shri.restinpeace.annotation.pagination.Paginated
-
Where the
Paginated.totalPagesSource()page count is read from within that source. - totalPagesSource() - Element in annotation type com.shri.restinpeace.annotation.pagination.Paginated
-
Where a total-page-count signal is read from, if any - compared against a running fetched-pages counter for termination (§6.5).
- totalSource() - Element in annotation type com.shri.restinpeace.annotation.pagination.Paginated
-
Where a total-record-count signal is read from, if any - compared against a running fetched-items counter for termination (§6.5).
- toUrl(String) - Static method in class com.shri.restinpeace.internal.PaginationRequestImpl
- toUrl(String) - Static method in interface com.shri.restinpeace.PaginationRequest
-
Follows the given URL verbatim for the next page, bypassing the method's own URL template entirely - the
PaginationStrategycounterpart ofpointerKind = FULL_URL. - TRACE - Enum constant in enum com.shri.restinpeace.interceptor.RequestContext.CurlVerbosity
-
--trace-ascii - --trace-time- a full, human-readable, per-line-timestamped trace of everything sent and received on the wire, headers and bodies both (tocurl's own stdout) - useful whenRequestContext.CurlVerbosity.VERBOSE's headers-only view isn't enough to explain a failure, or when the timing of one step in the exchange (a slow TLS handshake, a delayed response body) matters as much as its content. - tryAcquirePermission() - Method in interface com.shri.restinpeace.BulkheadProvider
-
Called before every attempt to ask whether the call should proceed at all.
- tryAcquirePermission() - Method in interface com.shri.restinpeace.CircuitBreakerProvider
-
Called before every attempt (once per
@Retryattempt too, the same per-attempt granularity RIP's own built-in breaker uses) to ask whether the call should proceed at all.
U
- UploadProgressListener - Interface in com.shri.restinpeace.upload
-
Notified as a
@Multipartmethod'sFile/InputStreamparts are written to the request body, for surfacing upload progress on a large file. - url() - Method in class com.shri.restinpeace.internal.PaginationRequestImpl
- Url - Annotation Type in com.shri.restinpeace.annotation.request
-
Uses the annotated
Stringparameter as the method's entire URL, instead of resolving one from the HTTP method annotation's template (with@BaseUrl/a runtime base URL and@PathParams). - URL - Enum constant in enum com.shri.restinpeace.constant.HTTPRequestParam
-
Bound via
@Url. - useDaemonThreadsForAsync() - Static method in class com.shri.restinpeace.internal.RequestExecutor
-
The non-
RIP-facing half ofRIP.useDaemonThreadsForAsync()- living here (rather than directly inRIP) so the daemon-thread setting can also be applied to aRipClientConfig-backed client's own dedicatedUnirestInstanceinRequestExecutor.buildInstance(com.shri.restinpeace.RipClientConfig), not just the shared staticUnirestclient. - useDaemonThreadsForAsync() - Static method in class com.shri.restinpeace.RIP
-
Opt-in: makes a CompletableFuture-returning call use daemon threads for Unirest's async client, so a short-lived program can exit on its own after an async call instead of hanging on non-daemon I/O threads.
V
- validate(Class<T>) - Static method in class com.shri.restinpeace.validator.ReflectiveRestClientValidator
-
Validates the given interface, collecting every problem found (missing
@RestClient, missing/duplicate HTTP method annotations, invalid URLs, unmatched path params, misused@Body, unsupportedCompletableFuturetype parameters) rather than stopping at the first one. - validate(Class<T>, String) - Static method in class com.shri.restinpeace.validator.ReflectiveRestClientValidator
-
Same as
ReflectiveRestClientValidator.validate(Class), but a relative method URL is validated againstbaseUrlOverrideinstead of requiring@BaseUrlon the interface - forRIP.getClient(Class, String), where the base URL is supplied at runtime instead of declared on the interface. - ValidationResult - Class in com.shri.restinpeace.validator
-
Accumulates validation errors found while checking a
@RestClientinterface, soReflectiveRestClientValidatorcan report every problem at once instead of failing on the first one. - ValidationResult() - Constructor for class com.shri.restinpeace.validator.ValidationResult
-
Creates an empty result with no errors recorded yet.
- value() - Element in annotation type com.shri.restinpeace.annotation.error.ErrorType
-
The class to deserialize the error response body into.
- value() - Element in annotation type com.shri.restinpeace.annotation.marker.BaseUrl
-
The base URL, e.g.
- value() - Element in annotation type com.shri.restinpeace.annotation.method.DELETE
-
The URL template to call, e.g.
- value() - Element in annotation type com.shri.restinpeace.annotation.method.GET
-
The URL template to call, e.g.
- value() - Element in annotation type com.shri.restinpeace.annotation.method.HEAD
-
The URL template to call, e.g.
- value() - Element in annotation type com.shri.restinpeace.annotation.method.meta.HTTPMethodMarker
-
The HTTP method the annotated HTTP-verb annotation represents.
- value() - Element in annotation type com.shri.restinpeace.annotation.method.meta.HTTPRequestParamMarker
-
The kind of request parameter binding the annotated parameter annotation represents.
- value() - Element in annotation type com.shri.restinpeace.annotation.method.OPTIONS
-
The URL template to call, e.g.
- value() - Element in annotation type com.shri.restinpeace.annotation.method.PATCH
-
The URL template to call, e.g.
- value() - Element in annotation type com.shri.restinpeace.annotation.method.POST
-
The URL template to call, e.g.
- value() - Element in annotation type com.shri.restinpeace.annotation.method.PUT
-
The URL template to call, e.g.
- value() - Element in annotation type com.shri.restinpeace.annotation.request.Field
-
The form field name.
- value() - Element in annotation type com.shri.restinpeace.annotation.request.HeaderParam
-
The header name to set.
- value() - Element in annotation type com.shri.restinpeace.annotation.request.Headers
-
The fixed headers to set, each as a
"Name: Value"string. - value() - Element in annotation type com.shri.restinpeace.annotation.request.Part
-
The multipart field name.
- value() - Element in annotation type com.shri.restinpeace.annotation.request.PathParam
-
The placeholder name to substitute, matching
{name}in the URL template. - value() - Element in annotation type com.shri.restinpeace.annotation.request.QueryParam
-
The query parameter name.
- VALUE - Enum constant in enum com.shri.restinpeace.annotation.pagination.PointerKind
-
The extracted pointer is a bare cursor/token/page-number value, resent via whichever parameter carries
@PaginationCursor. - valueOf(String) - Static method in enum com.shri.restinpeace.annotation.pagination.PaginationAdvance
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum com.shri.restinpeace.annotation.pagination.PaginationSignalSource
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum com.shri.restinpeace.annotation.pagination.PointerKind
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum com.shri.restinpeace.CircuitBreakerConfig.SlidingWindowType
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum com.shri.restinpeace.constant.HTTPMethod
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum com.shri.restinpeace.constant.HTTPRequestParam
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum com.shri.restinpeace.interceptor.RequestContext.CurlVerbosity
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum com.shri.restinpeace.annotation.pagination.PaginationAdvance
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum com.shri.restinpeace.annotation.pagination.PaginationSignalSource
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum com.shri.restinpeace.annotation.pagination.PointerKind
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum com.shri.restinpeace.CircuitBreakerConfig.SlidingWindowType
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum com.shri.restinpeace.constant.HTTPMethod
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum com.shri.restinpeace.constant.HTTPRequestParam
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum com.shri.restinpeace.interceptor.RequestContext.CurlVerbosity
-
Returns an array containing the constants of this enum type, in the order they are declared.
- VERBOSE - Enum constant in enum com.shri.restinpeace.interceptor.RequestContext.CurlVerbosity
-
-v- prints the request/response headers and connection infocurlitself sees (tocurl's own stderr), without touching either body. - VV - Enum constant in enum com.shri.restinpeace.interceptor.RequestContext.CurlVerbosity
-
-vv- everythingRequestContext.CurlVerbosity.VERBOSEprints, plus a per-line timestamp and a transfer/connection id prefix (e.g. - VVV - Enum constant in enum com.shri.restinpeace.interceptor.RequestContext.CurlVerbosity
-
-vvv- everythingRequestContext.CurlVerbosity.VVprints, plus a raw, hex-offset-prefixed dump of the actual header and body bytes sent and received on the wire (e.g. - VVVV - Enum constant in enum com.shri.restinpeace.interceptor.RequestContext.CurlVerbosity
-
-vvvv- everythingRequestContext.CurlVerbosity.VVVprints, plus a full trace ofcurl's own internal engine state machine (DNS resolution, TCP connect, Happy Eyeballs, connection-pool and multi-handle transitions, internal timers, ...) - by far the noisiest level, most of itcurl's own implementation detail rather than anything about the actual request/response.
W
- waitDurationInOpenState(Duration) - Method in class com.shri.restinpeace.CircuitBreakerConfig.Builder
-
Sets how long the breaker stays open before trialing recovery via a half-open state.
- withBodyField(String, Object) - Static method in class com.shri.restinpeace.internal.PaginationRequestImpl
- withBodyField(String, Object) - Static method in interface com.shri.restinpeace.PaginationRequest
-
Sets (or overrides) a dotted-path field within the next request's JSON body - the method must declare a
@Body Map<String,Object>parameter for this to apply to, the same carrier shape §6.7 uses for the declarative@Paginatedpath. - withHeader(String, Object) - Static method in class com.shri.restinpeace.internal.PaginationRequestImpl
- withHeader(String, Object) - Static method in interface com.shri.restinpeace.PaginationRequest
-
Sets (or overrides) a request header on the next request.
- withPathParam(String, Object) - Static method in class com.shri.restinpeace.internal.PaginationRequestImpl
- withPathParam(String, Object) - Static method in interface com.shri.restinpeace.PaginationRequest
-
Sets (or overrides) a
{name}URL path placeholder on the next request. - withQueryParam(String, Object) - Static method in class com.shri.restinpeace.internal.PaginationRequestImpl
- withQueryParam(String, Object) - Static method in interface com.shri.restinpeace.PaginationRequest
-
Sets (or overrides) a query parameter on the next request.
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form