Package su.onno.ui

Class DevReloadTrigger

java.lang.Object
su.onno.ui.DevReloadTrigger

public class DevReloadTrigger extends Object
Dev-mode reload signal: watches a trigger file and broadcasts a reload SSE event — a full browser refresh on every connected client — whenever the file is touched. The automatic reload (a devtools restart changing the bootId) covers recompiles; this covers everything a restart doesn't announce, and gives scripts and agents an explicit "refresh now" with no HTTP endpoint, no auth, no CSRF:
touch .onno-reload

The file is polled by modification time (a WatchService would need the parent directory to exist and buys nothing at a 500 ms cadence). A file already present at boot does not fire — only a touch after startup does. Inert (never started) outside dev mode.

  • Constructor Details

  • Method Details

    • disabled

      public static DevReloadTrigger disabled()
    • stop

      public void stop()