Class PushServerModule
- All Implemented Interfaces:
IServerModule<Object>
-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
Constructor Summary
ConstructorsConstructorDescriptionConstructor, invoked reflectively by the server's-moduleargument.Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Disposes of this server module.Gets the engine.Gets the description.Gets the name of the module.initialize(IServer server) Initializes the module end point constructor.voidonServerReady(IServer server) Called when the server is ready.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IServerModule
processServerArg
Constructor Details
PushServerModule
public PushServerModule()Constructor, invoked reflectively by the server's-moduleargument.
Method Details
getModuleName
Description copied from interface:IServerModuleGets the name of the module.- Specified by:
getModuleNamein interfaceIServerModule<Object>- Returns:
- A name such as "Load Balancer" or "License Manager".
getModuleDescripion
Description copied from interface:IServerModuleGets the description.- Specified by:
getModuleDescripionin interfaceIServerModule<Object>- Returns:
- A descriptive text of the module such a "Load Balancer for servers in the co.iizi.* domain" or "Backup License Manager for com.domain.LicMan".
initialize
Description copied from interface:IServerModuleInitializes the module end point constructor.- Specified by:
initializein interfaceIServerModule<Object>- Parameters:
server- The server instance.- Returns:
- The end point constructor.
- Throws:
Exception- For failures: the module will not be used...
onServerReady
Description copied from interface:IServerModuleCalled when the server is ready. A server module that wishes to listen to when the server is going to be disposed can do so usingIServer.addDisposeListener(com.iizix.server.IServerDisposeListener)at this stage.- Specified by:
onServerReadyin interfaceIServerModule<Object>- Parameters:
server- The server instance.
dispose
public void dispose()Description copied from interface:IServerModuleDisposes of this server module. After dispose is called andIServerModule.dispose()has been called, the end point constructor is automatically removed and disposed of.- Specified by:
disposein interfaceIServerModule<Object>
getEngine