Package org.ka2ddo.yaac.ax25
Class MsgEventDispatcher.QueuedMsgEvent
java.lang.Object
org.ka2ddo.yaac.ax25.MsgEventDispatcher.QueuedMsgEvent
- Enclosing class:
- MsgEventDispatcher
Helper class for queuing events that can't be fired immediately (perhaps because they were detected
while in mutex-synchronized code).
-
Constructor Summary
ConstructorDescriptionQueuedMsgEvent
(MsgEventType type, StationState ss, AX25Message msg, String text, Object other) Create a QueuedMsgEvent object with the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoid
fire()
Trigger the event notification for this queued set of parameters under safe circumstances.getMsg()
Get the AX.25 decoded message associated with this event.getOther()
Get the other type of Java Object associated with this event.Get the StationState for the station or object this event is about.getText()
Get the arbitrary text string associated with this event.getType()
Get the type of event this object is describing.
-
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 eventss
- StationState associated with eventmsg
- AX25Message associated with eventtext
- String associated with eventother
- 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
Get the type of event this object is describing.- Returns:
- MsgEventType
-
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
Get the AX.25 decoded message associated with this event.- Returns:
- AX25Message, or null if no packet associated with this event
-
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
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 ofMsgEventType
.- Returns:
- Object, or null if no Object of class other than String, StationState, or AX25Message is associated with this event
-