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.
A mapper between a
HttpClientResponse and a Duration representing a delay due to rate limiting.-
Method Summary
Modifier and TypeMethodDescriptionapply(HttpClientResponse response) Apply this function to aHttpClientResponseto obtain aDurationrepresenting a delay due to rate limiting.
-
Method Details
-
apply
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
-