Package discord4j.rest.request
@NonNullApi
package discord4j.rest.request
Components to build and route requests to the Discord REST API.
-
ClassDescriptionAn implementation of
GlobalRateLimiter
that uses aRateLimitOperator
coordinate requests, injecting an additional delay if a source trips the limiter early throughBucketGlobalRateLimiter.rateLimitFor(Duration)
.Used to access the appropriateRequestStream
according to the bucket that requests for the stream fall into.Facilitates the routing ofDiscordWebRequest
instances to the properRequestStream
according to the bucket in which the request falls.Thrown when a REST request is discarded because of a queue overflow.Template encoding all the needed information to make an HTTP request to Discord.Contract to handle aMono
ofClientResponse
after a network exchange is done.Used to prevent requests from being sent while the bot is globally rate limited.The retry function used for reading and completing HTTP requests.A mapper between aHttpClientResponse
and aDuration
representing a delay due to rate limiting.RequestQueue<T>Abstraction for a REST request queue.Factory to createRequestQueue
instances.A predicate that can match a givenDiscordWebRequest
.Represents a connector executingDiscordWebRequest
objects against the Discord REST API.Options used to control the behavior of aRouter
.