[33:21] static (extern: com.lehman.aussomserver.stdlib.AussomApp) extends: object
Aussom-Server app static. Mirrors the Aussom CLI's app
surface; on the server it currently exposes the cooperative
cancellation lifecycle. Other CLI affordances such as loadJar
and openWebPage will land here in a later round.
Polling these is the right pattern in a tight loop. For one-
shot cleanup, register with onBeforeReload / onBeforeShutdown.
Calls work from any code running on an app's engine, including
Thread.run() and Timer callbacks defined outside AppBase, so
helper classes do not need to capture the app reference solely
to query lifecycle.
isReloadPending ()
True when the calling app is reloading (init() is in progress) or when the engine the call is running against has been superseded by a newer engine. Long-running jobs and threads should poll this and exit cooperatively so the next run starts against the fresh code.
A bool.isShutdownPending ()
True when the JVM is shutting down. Bail out and let any cleanup finish before the configured shutdown grace expires.
A bool.isStopRequested ()
Convenience: true when isReloadPending() or isShutdownPending() is true. Cheap to call in tight loops.
A bool.onBeforeReload (callback Cb)
Registers a callback fired before this app reloads. Runs synchronously on the reload-triggering thread, against the old engine, before init() rebuilds. Multiple callbacks are invoked in registration order.
Cb is the callback (no arguments).onBeforeShutdown (callback Cb)
Registers a callback fired when the JVM begins shutdown. Invoked from the shutdown hook before the scheduler stops.
Cb is the callback (no arguments).loadJar (string JarFile)
Loads a JAR onto the running server's classpath at runtime so Java classes inside it become resolvable to subsequent AJI calls and includes. Disabled by default; the server's security manager must set 'aussom.app.loadjar' to true for the call to succeed. Resolution order: literal path, then the engine's include paths (the app's own directory), then the server install's lib/ directory. Classes loaded this way live for the JVM's lifetime; app reload does not unload them. The system class loader is shared across every app on the server, so a JAR loaded by one app is visible to the others from then on.
JarFile is a string with the JAR file path or filename.A bool, true on success. Throws when disabled or not found.