Class IdleShutdownManager

java.lang.Object
com.tnsai.server.health.IdleShutdownManager

public final class IdleShutdownManager extends Object
Auto-shuts down the server after a configurable idle period (default: 30 min) when no active WebSocket connections exist (ADR-2).
  • Constructor Details

  • Method Details

    • onConnectionOpened

      public void onConnectionOpened()
      Called when a connection is established. Cancels any pending shutdown.
    • onConnectionClosed

      public void onConnectionClosed()
      Called when a connection is closed. If no more connections exist, schedules shutdown after the idle timeout.
    • start

      public void start()
      Start monitoring. If no connections exist at start, schedule shutdown.
    • stop

      public void stop()