Class EventManager


  • public class EventManager
    extends Object
    Manages distribution of lifecycle events to registered callback handlers.
    • Constructor Detail

      • EventManager

        public EventManager()
    • Method Detail

      • getInstance

        public static EventManager getInstance()
        Get the singleton instance
        Returns:
      • registerServiceManagerId

        public static void registerServiceManagerId​(Object serviceManagerId)
        Called once by the object managing the lifecycle of the system. The serviceManagerId is simply an object private to the managing object. The identity of this object is checked when making subsequent lifecycle calls, making it simple to enforce the restriction that only one component in the system can manage these lifecycle events.
        Parameters:
        serviceManagerId -
      • register

        public static void register​(EventCallback cb)
        Register the given EventCallback to receive lifecycle events
        Parameters:
        cb -
      • serverReady

        public static void serverReady​(Object serviceManagerId)
        Called by the lifecycle manager to advertise that the server is ready
        Parameters:
        serviceManager -
      • startShutdown

        public static void startShutdown​(Object serviceManagerId)
        Called by the lifecycle manager to advertise that the server shutdown has been initiated
        Parameters:
        serviceManagerId -
      • finalShutdown

        public static void finalShutdown​(Object serviceManagerId)
        Called by the lifecycle manager to advertise that the server shutdown should be completed
        Parameters:
        serviceManagerId -