Class SpaNotFoundHandlerRegistry
java.lang.Object
com.kingsrook.qqq.middleware.javalin.routeproviders.SpaNotFoundHandlerRegistry
Path-scoped SPA 404 handlers owned by one Javalin configuration.
A single error handler delegates by longest matching prefix, with root last.
Javalin app data keeps unrelated servers and their handler lists isolated.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear all registered handlers (useful for testing) The configuration keeps its registered error handler.static SpaNotFoundHandlerRegistrygetInstance(io.javalin.config.JavalinConfig config) Get this configuration's registry and install its error handler once.voidregisterSpaHandler(String spaPath, Consumer<io.javalin.http.Context> handler) Register a path-scoped 404 handler
-
Method Details
-
getInstance
Get this configuration's registry and install its error handler once. Called during Javalin configuration, before the server accepts requests. -
registerSpaHandler
-
clear
public void clear()Clear all registered handlers (useful for testing) The configuration keeps its registered error handler. Other servers' registries are unaffected.
-