Class MsgEventDispatcher.QueuedMsgEvent

java.lang.Object
org.ka2ddo.yaac.ax25.MsgEventDispatcher.QueuedMsgEvent
Enclosing class:
MsgEventDispatcher

public static class MsgEventDispatcher.QueuedMsgEvent extends Object
Helper class for queuing events that can't be fired immediately (perhaps because they were detected while in mutex-synchronized code).
  • Constructor Details

    • QueuedMsgEvent

      public QueuedMsgEvent(MsgEventType type, StationState ss, AX25Message msg, String text, Object other)
      Create a QueuedMsgEvent object with the specified parameters.
      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
  • Method Details

    • fire

      public void fire()
      Trigger the event notification for this queued set of parameters under safe circumstances. Note there is no safety check against firing this more than once; the caller is responsible for discarding used QueuedMsgEvent objects.
    • getType

      public MsgEventType getType()
      Get the type of event this object is describing.
      Returns:
      MsgEventType
    • getStationState

      public StationState getStationState()
      Get the StationState for the station or object this event is about.
      Returns:
      StationState, or null if not about a station or object
    • getMsg

      public AX25Message getMsg()
      Get the AX.25 decoded message associated with this event.
      Returns:
      AX25Message, or null if no packet associated with this event
    • getText

      public String getText()
      Get the arbitrary text string associated with this event. The event generating code is responsible for any localization or translation of the text.
      Returns:
      String, or null if no arbitrary text
    • getOther

      public Object getOther()
      Get the other type of Java Object associated with this event. This may be any Java class instance; typical values are defined in the various enum values of MsgEventType.
      Returns:
      Object, or null if no Object of class other than String, StationState, or AX25Message is associated with this event