Class PushServerModule

java.lang.Object
com.iizix.server.push.engine.PushServerModule
All Implemented Interfaces:
IServerModule<Object>

public final class PushServerModule extends Object implements IServerModule<Object>
The server module that runs the push engine: loaded by the server with -module com.iizix.server.push.engine.PushServerModule, initialized before the server starts, started when the server is ready and disposed with the other modules at shutdown.

This is how the engine reaches ServerShell without the server bundle naming it: ServerShell.addModule calls initialize(IServer), where the engine is built and registered in PushNotificationEngineProvider so that IServer.getPushNotificationEngine() answers; onWorkerStarted calls onServerReady(IServer) after the applications are loaded, where the engine starts and the PushServlet carrying the five /iizi-push/ endpoints is registered at PushServlet.PATH_SPEC through IServer.registerServlet; and ServerShell.dispose calls dispose() before it stops the executor, where the servlet is unregistered and the engine persists its spool and stops.

The module exposes no WebSocket end point; initialize(IServer) returns null.

Settings come from the server settings' $pushNotifications child when the configuration file carries one, else from a default PushNotificationsProps.

Author:
Christopher Mindus