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 bundle
  • GET <path>/app.css — styles
  • GET <path>/data — graph JSON consumed by the SPA

The route listener is registered during the

invalid reference
#provide
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.

 FlashApp.create(8080)
     .install(new OidcExtension(config))
     .install(new RouteViewerExtension())
     .scan("dev.example.handlers")
     .start();
 
  • Field Details

  • Constructor Details

    • RouteViewerExtension

      public RouteViewerExtension()
      Installs the viewer at "/routeviewer".
    • RouteViewerExtension

      public RouteViewerExtension(String path)
      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:
      configure in interface dev.relism.flash.extension.FlashExtension