S8
com.s8.meta.api.S8
SPI façade
S8 is the static entry into the stack. It does not construct servers itself. It loads the first S8WebServerFactory and S8ScriptRunnerFactory on the module path.
Static fields
- WEB_SERVER_FACTORY
- Loaded
S8WebServerFactory. public final static S8WebServerFactory WEB_SERVER_FACTORY - SCRIPT_RUNNER_FACTORY
- Loaded
S8ScriptRunnerFactory. public final static S8ScriptRunnerFactory SCRIPT_RUNNER_FACTORY
Failure mode
If no implementation is on the module path, static initialization throws IllegalStateException. Put the implementation module on the module path (Xenon for the web server, Krypton for scripts).
Example
S8WebServer server = S8.WEB_SERVER_FACTORY.createWebServer(
"/path/to/app-config.xml",
LaunchServer.class,
params -> params.addBootMethod(S8BootMethod.MAIN_BOOT_PAGE, AppBoot.INSTANCE));
server.start();
Intent Keep application code free of implementation types. Depend on
com.s8.meta.api; let the runtime plug the server underneath.