Interface IPushNotificationService
- All Known Subinterfaces:
IServer
- All Known Implementing Classes:
JakartaEEServer, JettyRunConfiguration, RuntimeBuilderServer, ServerShell, StandardServer
com.iizix.server.IServer extends this interface, so any holder of an IServer reaches the PN subsystem through it. The single method is a default, so the server interface gains PN access with no change to its implementors.
Dependency direction. The engine implementation lives in the com.iizix.server bundle, in the package com.iizix.server.push.engine, where PushEngineFactory builds it. That bundle requires com.iizix.core, where this interface lives. Core can therefore not name the engine class, and this default cannot construct it. The server bundle therefore hands its engine to core through PushNotificationEngineProvider when com.iizix.server.PushNotificationModule is initialized: ServerShell.onWorkerStarted registers that module with addModule after loadApplications and before the onServerReady loop, and the module is disposed with the other server modules at shutdown. This default reads the engine back. While no engine is registered the default throws rather than returning a stub: a throw fires the moment anything reaches it, whereas a stub would be silently depended on.
- Author:
- IIZI
Method Summary
Modifier and TypeMethodDescriptiondefault IPushNotificationEngineGets the Push Notification engine for this server.
Method Details
getPushNotificationEngine
Gets the Push Notification engine for this server.- Returns:
- The engine; never
null. - Throws:
UnsupportedOperationException- while no engine is registered, i.e. thePushNotificationModuleofcom.iizix.serverhas not been initialized in this server.