|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.clackrouter.topology.core.TopologyModel
public class TopologyModel
Represents the data of a single topology, combining information from a VNS topology file, and information provided by saved config files.
We get connectivity information from the VNS topology file, as well as host names. We get the graphical position of the components in the graph from the saved XML files.
A topology model can create a TopoGraph
to represent this topo.
The topology model also implements the "VSwitch" functionality, that checks to see if a packet being transmitted by a host on a Clack network can be handed directly to another clack host running locally, or whether it must be sent back all the way to the VNS server. This improves speed for larger clack topologies, as we cut out the round-trip to VNS infrastructure (i.e., stanford) for communication between two virtual hosts.
Nested Class Summary | |
---|---|
static class |
TopologyModel.Host
Represents a single host within a topology. |
static class |
TopologyModel.Interface
Represents an interface on a host within a topology. |
static class |
TopologyModel.Link
Represents an link between two hosts inside a topology. |
Field Summary | |
---|---|
static int |
ALERTER_LENGTH_MSEC
|
Constructor Summary | |
---|---|
TopologyModel(int topology,
java.util.ArrayList hosts,
java.util.ArrayList links,
boolean isLocal,
org.w3c.dom.Element topo_element)
|
Method Summary | |
---|---|
boolean |
attemptLocalTransmit(java.lang.String routerName,
TopologyModel.Link activeLink,
VNSPacket packet)
|
TopoGraph |
createTopoGraph(TopologyView view,
ClackDocument doc)
|
Alerter |
getAlerter()
|
EthernetAddress |
getFirewallHWAddr()
|
TopologyModel.Host |
getHost(java.lang.String name)
|
java.util.ArrayList |
getHosts()
|
TopologyModel.Link |
getLink(java.lang.String router1,
java.lang.String router2)
|
java.util.ArrayList |
getLinks()
|
java.util.Hashtable |
getLinksForHost(java.lang.String hostname)
|
int |
getTopology()
|
org.w3c.dom.Element |
getTopologyElement()
|
boolean |
isLocalTopology()
|
void |
setHostBoundsRects(java.util.Hashtable rects)
|
void |
setLinkStatus(ClackDocument doc,
java.lang.String router_name1,
java.lang.String router_name2,
boolean is_enabled)
Used to enable or disable a link. |
void |
setLinkStatus(ClackDocument doc,
TopologyModel.Link link,
boolean is_enabled)
Enable or disable the specified link, updating the GUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ALERTER_LENGTH_MSEC
Constructor Detail |
---|
public TopologyModel(int topology, java.util.ArrayList hosts, java.util.ArrayList links, boolean isLocal, org.w3c.dom.Element topo_element)
Method Detail |
---|
public boolean isLocalTopology()
public org.w3c.dom.Element getTopologyElement()
public java.util.ArrayList getLinks()
public java.util.ArrayList getHosts()
public Alerter getAlerter()
public void setHostBoundsRects(java.util.Hashtable rects)
public TopoGraph createTopoGraph(TopologyView view, ClackDocument doc)
public java.util.Hashtable getLinksForHost(java.lang.String hostname)
public boolean attemptLocalTransmit(java.lang.String routerName, TopologyModel.Link activeLink, VNSPacket packet)
public int getTopology()
public TopologyModel.Host getHost(java.lang.String name)
public EthernetAddress getFirewallHWAddr()
public TopologyModel.Link getLink(java.lang.String router1, java.lang.String router2)
public void setLinkStatus(ClackDocument doc, java.lang.String router_name1, java.lang.String router_name2, boolean is_enabled)
doc
- router_name1
- router_name2
- is_enabled
- public void setLinkStatus(ClackDocument doc, TopologyModel.Link link, boolean is_enabled)
doc
- link
- is_enabled
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |