Package discord4j.rest.request
Class DefaultRouter
java.lang.Object
discord4j.rest.request.DefaultRouter
- All Implemented Interfaces:
Router
Facilitates the routing of
DiscordWebRequest
instances to the proper RequestStream
according to
the bucket in which the request falls.-
Constructor Summary
ConstructorDescriptionDefaultRouter
(RouterOptions routerOptions) Create a Discord API bucket-awareRouter
configured with the given options. -
Method Summary
Modifier and TypeMethodDescriptionexchange
(DiscordWebRequest request) Queues a request for execution.
-
Constructor Details
-
Method Details
-
exchange
Description copied from interface:Router
Queues a request for execution.- Specified by:
exchange
in interfaceRouter
- Parameters:
request
- the request to queue.- Returns:
- a
DiscordWebResponse
specifying a contract to operate on the response
-