Class MsgEventDispatcher

java.lang.Object
org.ka2ddo.yaac.ax25.MsgEventDispatcher

public class MsgEventDispatcher extends Object
This singleton class provides a dispatcher of events of type MsgEventType. Listeners can register here to be informed of events.
Author:
Andrew Pavlin, KA2DDO
  • Method Details

    • addMsgEventListener

      public static void addMsgEventListener(MsgEventListener l)
      Register the specified listener for all types of events. Note that if the listener is already registered, its registration will remain unchanged; the types will not be altered.
      Parameters:
      l - MsgEventListener to register
    • addMsgEventListener

      public static void addMsgEventListener(MsgEventListener l, MsgEventType... types)
      Register the specified listener for all types of events. Note that if the listener is already registered, its registration will remain unchanged; the types will not be altered.
      Parameters:
      l - MsgEventListener to register
      types - MsgEventTypes to be reported; types not matching this list will not be reported to this particular listener
    • removeMsgEventListener

      public static void removeMsgEventListener(MsgEventListener l)
      Unregister a MsgEventListener.
      Parameters:
      l - MsgEventListener to remove
    • fireMsgEvent

      public static void fireMsgEvent(MsgEventType type, StationState ss, AX25Message msg, String text, Object other)
      Notify all interested MsgEventListeners about an event.
      Parameters:
      type - MsgEventType of event
      ss - StationState associated with event
      msg - AX25Message associated with event
      text - String associated with event
      other - Object of some other class associated with the event