Class JMapServerDataEventsManager

java.lang.Object
com.kheops.jmap.server.JMapServerDataEventsManager

public class JMapServerDataEventsManager extends Object
Centralized point to control jmap server events system. Accepts listeners to be registered for concrete types of events and notifies them once events are fired.
Asynchronous events queue manipulation is based in com.kheops.jmap.client.JMapEventQueue
  • Method Details

    • getInstance

      public static JMapServerDataEventsManager getInstance()
      Returns the JMap event queue instance. If the instance doesn't currently exist, a new instance is created.
      Returns:
      the JMap event queue instance.
    • addListener

      public void addListener(JMapServerDataEventListener listener)
    • removeListener

      public <EventObject extends JMapServerDataEvent> void removeListener(JMapServerDataEventListener<EventObject> listener)
    • notifyListeners

      public void notifyListeners(JMapServerDataEvent event)
    • destroy

      public void destroy()
      Destroys the singleton instance, invalidating all queued events.
    • setVerbose

      public void setVerbose(boolean verbose)
      Sets the verbose property of the event queue. If true, all events will be dumped to the standard output.
      Parameters:
      verbose - the boolean value to set.
    • isVerbose

      public boolean isVerbose()
      Returns the verbose property of the event queue. When true, all events will be dumped to the standard output.
    • fireEvent

      public void fireEvent(JMapServerDataEvent event)
      To publish an event notifying all subscribed listeners for the concrete event type.