public class MonitoredStationList extends java.lang.Object implements TrackerListener
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(MonitoredStationListener l)
Register a listener to be informed when the MonitoredStationList membership changes.
|
int |
addStation(MonitoredStation station)
Add a new monitored station record to the list.
|
MonitoredStation |
findStation(java.lang.String callsign)
Find a MonitoredStation record by its callsign string.
|
void |
fireMonitoredStationUpdated(int index)
Announce to all registered listeners that something has changed
about one of the entries in this list.
|
static MonitoredStationList |
getInstance()
Get the list of monitored stations.
|
MonitoredStation |
getStation(int index)
Get a MonitoredStation object by its list index,
|
int |
getStationCount()
Get the quantity of stations currently being monitored.
|
int |
indexOf(MonitoredStation station)
Get the position index in the list of the specified MonitoredStation.
|
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.
|
void |
removeListener(MonitoredStationListener l)
Unregister a listener from being informed when the MonitoredStationList membership changes.
|
void |
removeStation(int index)
Delete a MonitoredStation from the list of monitored stations.
|
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.
|
public static MonitoredStationList getInstance()
public int getStationCount()
public MonitoredStation getStation(int index)
index - zero-based position index of MonitoredStation in the listjava.lang.ArrayIndexOutOfBoundsException - if index < 0 or index >= the length of the listpublic MonitoredStation findStation(java.lang.String callsign)
callsign - String callsign-SSID of monitored station to look uppublic int indexOf(MonitoredStation station)
station - MonitoredStation record to look up in list (must be an entry in the list, not a clone)public int addStation(MonitoredStation station) throws java.lang.IllegalArgumentException
station - MonitoredStation record to add to listjava.lang.IllegalArgumentException - if this MonitoredStation record or another one with the same
callsign string is already in the listpublic void removeStation(int index)
index - zero-based index of station to removepublic void fireMonitoredStationUpdated(int index)
index - zero-based index of modified recordpublic void addListener(MonitoredStationListener l)
l - MonitoredStationListener to registerpublic void removeListener(MonitoredStationListener l)
l - MonitoredStationListener to unregisterpublic void messageAdded(StationState ss, int index, AX25Message msg)
messageAdded in interface TrackerListenerss - 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 TrackerListenerss - 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 stationAdded(StationState ss, int index)
stationAdded in interface TrackerListenerss - 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 TrackerListenerss - 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 TrackerListenerss - StationState containing the station's informationindex - zero-based integer sequence number for this station in the StationTracker