Interface WebsocketRouteBuilder<R extends RequestContext<?>,
W extends WebsocketContext<?>>
- All Known Implementing Classes:
Method SummaryModifier and TypeMethodDescriptionAdds a before filter.A WebSocket route may have multiple "classes" to identify and group them.Creates and returns the WebSocket route without adding it to the router.
voidSaves the WebSocket route on the router.The WebSocket route id.The path that trigger the beginning of that HTTP to WebSocket connection.Skip a "before" filter for this WebSocket route ("after" filters are never run).This sould only by called by *plugins*.
pathThe path that trigger the beginning of that HTTP to WebSocket connection.
idThe WebSocket route id.
classesA WebSocket route may have multiple "classes" to identify and group them.
For example, multiple routes may share the same "account" class and this information could be used to set a menu item as being active on an HTML page.
spicastCoreRouteOrPluginRouteThis sould only by called by *plugins*.
When this method is called, the resulting route won't be remove by default when the
Router.removeAllRoutes()method is used. The
truewill have to be called to actually remove it.
This is useful during development, when an hotreload mecanism is used to reload the Router without restarting the application, when the application routes changed. By default only the routes for which the
#isSpicastCoreRouteOrPluginRoute()method has been called would then be reloaded.
beforeAdds a before filter. Those will be run before the WebSocket connection handshake is started.
Note that there are no "after" filters because once a WebSocket connection is established, the HTTP one is no more.
skipSkip a "before" filter for this WebSocket route ("after" filters are never run).
This is useful when you set a global filter but want to skip it one a specific route only.
handleSaves the WebSocket route on the router.
createCreates and returns the WebSocket route without adding it to the router. NOTE : use
handle(...)instead to save the route to the router at the end of the build process!