public class ObjectReportSender extends SendableMessageWrapper implements TrackerListener
SendableMessageWrapper.SendableMessageState
BULLETIN_SEQUENCE_CHARS
NO_FRAMES
Constructor and Description |
---|
ObjectReportSender(ObjectReport msg)
Wrap an ObjectReport for locally initiated transmission as many times as the
object definition says (3 times for transient objects, forever for permanent objects),
|
ObjectReportSender(ObjectReport msg,
int maxTransmits)
Wrap an ObjectReport for locally initiated transmission the specified number of times,
|
Modifier and Type | Method and Description |
---|---|
protected void |
cleanup()
Do any cleanup work involved in removing this wrapped message from the
transmission queue.
|
void |
messageAdded(StationState ss,
int index,
AX25Message msg)
Called when a Message is added to the history for a station in the tracker.
|
void |
messageDeleted(StationState ss,
int index,
AX25Message msg)
Called when a AX25Message is deleted from the history for a station in the tracker.
|
static ObjectReportSender |
readFromPreferences(java.util.prefs.Preferences prefs,
java.lang.String objectName)
Recreate an ObjectReport and its encapsulating ObjectReportSender from
the preferences cache.
|
void |
removeFromPreferences(java.util.prefs.Preferences prefs)
Delete this ObjectReportSender and its contained ObjectReport from
the preferences cache.
|
void |
stationAdded(StationState ss,
int index)
Called when a new station is initially added to the tracker.
|
void |
stationDeleted(StationState ss,
int index)
Called when an existing station is deleted from the tracker.
|
void |
stationUpdated(StationState ss)
Called when an existing station is updated with new information in the tracker.
|
void |
writeToPreferences(java.util.prefs.Preferences prefs)
Store this ObjectReportSender and its contained ObjectReport in the
preferences cache.
|
addSendableMessageUpdateListener, buildAX25FrameForMessage, cancelPermanently, cancelTransmission, computeRandomizedTransmitTime, findDuplicateWrapperOf, findWrapperOf, getConnector, getDecayRatio, getDigipeatPaths, getFrames, getId, getInitialSendRate, getLastTransmitTime, getMaxTransmits, getMsg, getNextMessage, getNumTransmissions, getNumTransmitsBeforeDecay, getObjectsInGroup, getOutstandingMessages, getQruGroupCounts, getRemainingTransmits, getSendableState, getSlowSendRate, isAcked, isActive, isRejected, isUseGpsForPosition, queueForTransmission, removeObsoleteMessage, removeObsoleteMessage, removeSendableMessageUpdateListener, requeue, resetTransmitCount, setAcked, setConnector, setDecayRatio, setDigipeatPaths, setInitialSendRate, setMaxTransmits, setNextMessage, setRejected, setSendableMessageListener, setSendableState, setSlowSendRate, toString
public ObjectReportSender(ObjectReport msg)
msg
- ObjectReport to transmitpublic ObjectReportSender(ObjectReport msg, int maxTransmits)
msg
- ObjectReport to transmitmaxTransmits
- number of times the ObjectReport should be transmittedpublic void stationAdded(StationState ss, int index)
stationAdded
in interface TrackerListener
ss
- StationState containing the station's information; the initial AX25Message
will not yet be stored within the StationState objectindex
- zero-based integer sequence number for this station in the StationTrackerpublic void stationUpdated(StationState ss)
stationUpdated
in interface TrackerListener
ss
- StationState containing the station's information; the new AX25Message
will not yet be stored within the StationState objectpublic void stationDeleted(StationState ss, int index)
stationDeleted
in interface TrackerListener
ss
- StationState containing the station's informationindex
- zero-based integer sequence number for this station in the StationTrackerpublic void messageAdded(StationState ss, int index, AX25Message msg)
messageAdded
in interface TrackerListener
ss
- StationState containing the station's informationindex
- zero-based index of the message added to the StationState objectmsg
- APRS Message object being added to the tracker; note that non-APRS packets
that can still be decoded (such as OpenTRAC) will also be passed
here; AX25Frames that cannot be decoded will pass null herepublic void messageDeleted(StationState ss, int index, AX25Message msg)
messageDeleted
in interface TrackerListener
ss
- StationState containing the station's information; the AX25Message
will already be removed from the StationState objectindex
- zero-based index of the message removed from the StationState objectmsg
- APRS Message object being removed from the tracker; note that non-APRS packets
that can still be decoded (such as OpenTRAC) will also be passed
here; AX25Frames that cannot be decoded will pass null herepublic void writeToPreferences(java.util.prefs.Preferences prefs)
prefs
- Preferences node to contain the object recordprotected void cleanup()
cleanup
in class SendableMessageWrapper
public void removeFromPreferences(java.util.prefs.Preferences prefs)
prefs
- Preferences node containing the object recordpublic static ObjectReportSender readFromPreferences(java.util.prefs.Preferences prefs, java.lang.String objectName)
prefs
- the Preferences node containing the object informationobjectName
- String name of cached Object/Item