Package markets.alpaca.client.http
Class AlpacaRetryInterceptor
java.lang.Object
markets.alpaca.client.http.AlpacaRetryInterceptor
- All Implemented Interfaces:
okhttp3.Interceptor
OkHttp interceptor that retries idempotent REST responses according to an
AlpacaRetryPolicy.-
Nested Class Summary
Nested classes/interfaces inherited from interface okhttp3.Interceptor
okhttp3.Interceptor.Chain, okhttp3.Interceptor.Companion -
Field Summary
Fields inherited from interface okhttp3.Interceptor
Companion -
Method Summary
Modifier and TypeMethodDescriptionstatic AlpacaRetryInterceptorcreate()Creates an interceptor withAlpacaRetryPolicy.defaultPolicy().static AlpacaRetryInterceptorcreate(AlpacaRetryPolicy policy) Creates an interceptor with the supplied policy.okhttp3.Responseintercept(okhttp3.Interceptor.Chain chain)
-
Method Details
-
create
Creates an interceptor withAlpacaRetryPolicy.defaultPolicy(). -
create
Creates an interceptor with the supplied policy. -
intercept
- Specified by:
interceptin interfaceokhttp3.Interceptor- Throws:
IOException
-