Class RateLimitInterceptor
Object
ch.aaap.harvestclient.core.ratelimit.RateLimitInterceptor
- All Implemented Interfaces:
okhttp3.Interceptor
-
Nested Class Summary
Nested classes/interfaces inherited from interface okhttp3.Interceptor
okhttp3.Interceptor.Chain
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
int
okhttp3.Response
intercept
(okhttp3.Interceptor.Chain chain)
-
Constructor Details
-
RateLimitInterceptor
public RateLimitInterceptor(int maxRequestPerWindow, int windowSeconds)
-
-
Method Details
-
intercept
- Specified by:
intercept
in interfaceokhttp3.Interceptor
- Throws:
IOException
-
getMaxRequestPerWindow
public int getMaxRequestPerWindow() -
getWindowSeconds
public int getWindowSeconds()
-