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
ConstructorsConstructorDescriptionDefaultRouter(RouterOptions routerOptions) Create a Discord API bucket-awareRouterconfigured 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:RouterQueues a request for execution.- Specified by:
exchangein interfaceRouter- Parameters:
request- the request to queue.- Returns:
- a
DiscordWebResponsespecifying a contract to operate on the response
-