Package discord4j.rest.request
Interface RateLimitStrategy
-
- All Known Implementing Classes:
ResponseHeaderStrategy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface RateLimitStrategy
A mapper between aHttpClientResponseand aDurationrepresenting a delay due to rate limiting.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Durationapply(HttpClientResponse response)Apply this function to aHttpClientResponseto obtain aDurationrepresenting a delay due to rate limiting.
-
-
-
Method Detail
-
apply
Duration apply(HttpClientResponse response)
Apply this function to aHttpClientResponseto obtain aDurationrepresenting a delay due to rate limiting.- Parameters:
response- the originalHttpClientResponse- Returns:
- a
Durationindicating rate limiting, can beDuration.ZEROif no limit is present
-
-