Interface IPushNotificationService

All Known Subinterfaces:
IServer
All Known Implementing Classes:
JakartaEEServer, JettyRunConfiguration, RuntimeBuilderServer, ServerShell, StandardServer

public interface IPushNotificationService
The push notification service facet of the server.

com.iizix.server.IServer extends this interface, so any holder of an IServer reaches the push subsystem through it. The single method is a default, so the server interface gains push access with no change to its implementors.

Dependency direction. The engine implementation lives in the com.iizix.server.push bundle, which requires com.iizix.server, which requires com.iizix.core, where this interface lives. Core can therefore not name the engine class, and this default cannot construct it. The engine bundle therefore hands its engine to core through PushNotificationEngineProvider when its server module is initialized (started and disposed by ServerShell with the other server modules), and this default reads it 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 Details

    • getPushNotificationEngine

      default IPushNotificationEngine getPushNotificationEngine()
      Gets the push notification engine for this server.
      Returns:
      The engine; never null.
      Throws:
      UnsupportedOperationException - while no engine is registered, i.e. the com.iizix.server.push module is not loaded in this server.