Class FastPathWsRouterImpl
java.lang.Object
dev.relism.flash.routing.AbstractWsRouter
dev.relism.flash.routing.routers.fastpathrouter.FastPathWsRouterImpl
WebSocket-upgrade counterpart of
FastPathRouterImpl — same fpr-core matching
via newScratch() in place of the ThreadLocals this class used to hold). Unlike
registry entry names FastPathRouterImpl.route specifically) and still allocates a
fresh PathParams per matched, parametric WebSocket upgrade — WebSocket upgrades are
inherently rare relative to ordinary requests (one per connection, not one per message), so
this was not flagged as a hot-path allocation concern.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractWsRouteraddRoute(HttpMethod method, String path, WebSocketHandler handler) voidcompile()Eagerly validates and compiles this WebSocket route graph before traffic is accepted.Creates a fresh per-connection scratch object forAbstractWsRouter.route(dev.relism.flash.models.Request, java.lang.Object), ornullif this router keeps no reusable per-connection state — seeAbstractRouter.newScratch()for router.Methods inherited from class dev.relism.flash.routing.AbstractWsRouter
register, setPathParams
-
Constructor Details
-
FastPathWsRouterImpl
public FastPathWsRouterImpl()
-
-
Method Details
-
newScratch
Description copied from class:AbstractWsRouterCreates a fresh per-connection scratch object forAbstractWsRouter.route(dev.relism.flash.models.Request, java.lang.Object), ornullif this router keeps no reusable per-connection state — seeAbstractRouter.newScratch()for router.- Overrides:
newScratchin classAbstractWsRouter
-
addRoute
- Specified by:
addRoutein classAbstractWsRouter
-
route
- Specified by:
routein classAbstractWsRouter
-
compile
public void compile()Description copied from class:AbstractWsRouterEagerly validates and compiles this WebSocket route graph before traffic is accepted.- Overrides:
compilein classAbstractWsRouter
-