|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectist.palcom.localnetworkview.PalcomDeviceTree
public class PalcomDeviceTree
PalcomDeviceTree describes a device's view of the world. It builds a tree rooted by the Universe node which has two children: - Net - the tree of devices and services known through discovery - ConnectionList - the list of known connections The class is responsible for keeping the tree consistent. E.g., if a device is removed from the tree, all connections having that device as provider or consumer are also removed. There are two ways of reacting to changes to the tree: - addNode() and removeNode() return true if the request led to an actual modification to the tree (duplicates and irrelevant messages are ignored) - objects implementing DeviceTreeChangeListener can register for notification when nodes are added, removed, or changed. As much as possible of the functionality (e.g., lookup, etc.) is delegated to the NetworkNode class hierarchy and implemented in the attribute grammar.
| Constructor Summary | |
|---|---|
PalcomDeviceTree()
|
|
| Method Summary | |
|---|---|
void |
addChangeListener(DeviceTreeChangeListener l)
|
boolean |
addNode(java.lang.Object i)
addNode is inserts newly discovered services and connections into the tree. |
Universe |
getUniverse()
|
void |
removeChangeListener(DeviceTreeChangeListener l)
|
void |
removeConnections()
A crude way of implementing refresh of the communications list |
boolean |
removeNode(java.lang.Object i)
Remove the node(s) corresponding to an Info, including dependencies (e.g, if a device is removed, its connections are also removed) The public method delegates the actual work to private methods, one for each type of node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PalcomDeviceTree()
| Method Detail |
|---|
public Universe getUniverse()
public boolean addNode(java.lang.Object i)
public boolean removeNode(java.lang.Object i)
i - - the Info
public void removeConnections()
public void addChangeListener(DeviceTreeChangeListener l)
public void removeChangeListener(DeviceTreeChangeListener l)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||