Uses of Package
com.shri.restinpeace.interceptor
Packages that use com.shri.restinpeace.interceptor
Package
Description
-
Classes in com.shri.restinpeace.interceptor used by com.shri.restinpeaceClassDescriptionGlobal hook into every request/response made through RIP, registered via
RIP.addInterceptor(RequestInterceptor). -
Classes in com.shri.restinpeace.interceptor used by com.shri.restinpeace.interceptorClassDescriptionPre-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.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.Per-call state passed to aRequestInterceptor'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)).How much extra diagnostic detailRequestContext.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.Global hook into every request/response made through RIP, registered viaRIP.addInterceptor(RequestInterceptor).A synthetic response aRequestInterceptor.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). -
Classes in com.shri.restinpeace.interceptor used by com.shri.restinpeace.internalClassDescriptionPer-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)).Global hook into every request/response made through RIP, registered viaRIP.addInterceptor(RequestInterceptor).