Notification Sink
Host-agnostic sink for transient user-facing notifications.
Any UI shell (Swing toasts, web push, CLI ANSI lines, headless test collector) implements this interface; substrate code that needs to surface an event-class message receives a sink reference and calls one of the methods below. This replaces the older per-panel onMessage: (String, NotificationSeverity) -> Unit callback idiom with a single uniform contract.
Thread-safety contract
Implementations must be safe to call from any thread. The intent is that substrate code (which may emit from ksl.simulation.SimulationDispatcher.default background workers or kotlinx.coroutines IO dispatcher threads) can call into a notification sink without coordinating its own dispatcher marshalling. Implementations marshal to whatever thread they need internally (e.g. a Swing implementation uses SwingUtilities.invokeLater).
Convenience methods
The default info / warn / error methods build a NotificationSpec with the appropriate severity and delegate to emit. Callers that need a non-default dismiss duration build a NotificationSpec explicitly and call emit directly.
Inheritors
Types
Functions
Emit one notification. Must be safe to call from any thread — implementations marshal to whatever dispatcher they need.
Convenience: emit a NotificationSeverity.ERROR notification.
Convenience: emit an NotificationSeverity.INFO notification.
Convenience: emit a NotificationSeverity.WARNING notification.