Package dev.relism.flash.ext.routeviewer
Class RouteViewerExtension
java.lang.Object
dev.relism.flash.ext.routeviewer.RouteViewerExtension
- All Implemented Interfaces:
dev.relism.flash.extension.FlashExtension
public class RouteViewerExtension
extends Object
implements dev.relism.flash.extension.FlashExtension
Mounts an interactive route-graph viewer at a configurable HTTP endpoint.
The viewer is a React SPA (@xyflow/react) bundled into the JAR.
It renders routers, routes, handler inheritance chains, and middleware chains
as a draggable, zoomable node graph.
Endpoints registered
GET <path>— SPA shell (index.html)GET <path>/app.js— React bundleGET <path>/app.css— stylesGET <path>/data— graph JSON consumed by the SPA
The route listener is registered during the
phase, before any routes
are compiled. Combined with the two-phase extension model, this guarantees all routes
(including those from other extensions) are always captured — install order is irrelevant.
invalid reference
#provide
FlashApp.create(8080)
.install(new OidcExtension(config))
.install(new RouteViewerExtension())
.scan("dev.example.handlers")
.start();
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInstalls the viewer at "/routeviewer".RouteViewerExtension(String path) Installs the viewer at a custom path. -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(dev.relism.flash.extension.FlashRegistrar<?> app, dev.relism.flash.extension.FlashContext ctx)
-
Field Details
-
DEFAULT_PATH
- See Also:
-
-
Constructor Details
-
RouteViewerExtension
public RouteViewerExtension()Installs the viewer at "/routeviewer". -
RouteViewerExtension
Installs the viewer at a custom path.- Parameters:
path- e.g."/_routes"
-
-
Method Details
-
configure
public void configure(dev.relism.flash.extension.FlashRegistrar<?> app, dev.relism.flash.extension.FlashContext ctx) - Specified by:
configurein interfacedev.relism.flash.extension.FlashExtension
-