|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ka2ddo.yaac.core.LocalObjectTracker
public class LocalObjectTracker
This class manages and tracks the state of Objects being originated by the local station. It handles shutting down an Object when some other station takes it over, and adding Objects to this list when locally created or taken over from other stations.
Nested Class Summary | |
---|---|
static interface |
LocalObjectTracker.LocalObjectListener
This interfaces defines an object that can be informed about changes to the ObjectReports stored in the LocalObjectTracker, |
static class |
LocalObjectTracker.ObjectLink
This class maintains an association between a local ObjectReport and the ObjectReportSender used to transmit this object to the network (assuming that the Object is enabled for transmission). |
Method Summary | |
---|---|
void |
add(ObjectReport or)
Add another ObjectReport to the tracker, that does not currently have an ObjectReportSender. |
void |
add(ObjectReportSender ors)
Add another ObjectReport to the tracker, that in currently encapsulated by an ObjectReportSender. |
void |
addLocalObjectListener(LocalObjectTracker.LocalObjectListener l)
Register a listener to be informed of changes in the tracker. |
void |
aprsMessageReceived(Message msg)
Delivers the next message received by YAAC that is an APRS message. |
LocalObjectTracker.ObjectLink |
get(int index)
Get the Nth ObjectReport record in the tracker. |
LocalObjectTracker.ObjectLink |
get(java.lang.String objectName)
Get the ObjectReport record in the tracker with a specified object name, |
static LocalObjectTracker |
getInstance()
Get the singleton instance of the LocalObjectTracker. |
int |
indexOf(java.lang.String objectName)
Get the zero-based index of the tracked ObjectReport with the specified name |
void |
remove(java.lang.String objectName)
Stop tracking an ObjectReport with the specified name. |
void |
removeLocalObjectListener(LocalObjectTracker.LocalObjectListener l)
Unregister a listener to be informed of changes in the tracker. |
int |
size()
Report the number of ObjectReports currently being tracked. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static LocalObjectTracker getInstance()
public void aprsMessageReceived(Message msg)
aprsMessageReceived
in interface AprsMessageListener
msg
- some subclass of Message containing the message contents; the message should have
an AX25Frame connected to itAX25Frame
,
AX25Message.ax25Frame
,
AX25Message.getAx25Frame()
public int size()
public LocalObjectTracker.ObjectLink get(int index) throws java.lang.IndexOutOfBoundsException
index
- zero-based index of record to fetch
java.lang.IndexOutOfBoundsException
- if index is negative or greater than the number of entries in the trackerpublic LocalObjectTracker.ObjectLink get(java.lang.String objectName)
objectName
- String of object name
public void add(ObjectReport or)
or
- ObjectReport to addpublic void add(ObjectReportSender ors)
ors
- ObjectReportSender to addpublic void remove(java.lang.String objectName)
objectName
- String name of object to unregisterpublic int indexOf(java.lang.String objectName)
objectName
- String name of ObjectReport
public void addLocalObjectListener(LocalObjectTracker.LocalObjectListener l)
l
- LocalObjectListener to registerpublic void removeLocalObjectListener(LocalObjectTracker.LocalObjectListener l)
l
- LocalObjectListener to unregister
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |