public abstract class TopoStore extends java.lang.Object implements TopoStoreInterface
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Set<TopoVertex> |
topoVertices |
| Constructor and Description |
|---|
TopoStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(TopoEdge topoEdge)
Adds an edge to list of topology links and topology graph.
|
void |
addHost(TopoHost topoHost)
Adds a host to the list of topology hosts.
|
void |
addSwitch(TopoSwitch topoSwitch)
Adda network device (i.e.
|
boolean |
checkHostExistenceWithIP(org.onlab.packet.Ip4Address ip4Address)
Checks existence of a host based on its IPv4 address.
|
boolean |
checkHostExistenceWithMac(org.onlab.packet.MacAddress macAddress)
Checks existence of a host based on its MAC address.
|
void |
clear() |
void |
fetchTopo() |
org.jgrapht.Graph<TopoVertex,TopoEdge> |
getGraph()
Returns topology graph.
|
java.util.Set<TopoHost> |
getHosts()
Returns a list of hosts in the network topology.
|
java.util.List<TopoEdge> |
getShortestPath(java.lang.String srcDevice,
java.lang.String dstDevice)
Returns shortest path between two end-points.
|
java.util.Set<TopoSwitch> |
getSwitches()
Returns a list of network switches in the network topology.
|
java.util.Set<TopoEdge> |
getTopoEdges() |
TopoHost |
getTopoHostByIP(org.onlab.packet.Ip4Address ipAddress)
Finds a host in the network topology based on a given IPv4 address.
|
TopoHost |
getTopoHostByMac(org.onlab.packet.MacAddress macAddress)
Finds a host based on a given Mac address.
|
void |
printDevices()
Prints list of network devices in the current network topology.
|
void |
printHosts()
Prints list of topology hosts in the current network topology.
|
void |
printLinks()
Prints list of topology links in the current network topology.
|
void |
printPath(java.util.List<TopoEdge> path)
Prints an end-to-end path between two end points.
|
void |
printTopo()
Prints topology information including list of devices, hosts, and links.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitupdateTopoprotected java.util.Set<TopoVertex> topoVertices
public void clear()
public void fetchTopo()
fetchTopo in interface TopoStoreInterfacepublic void addSwitch(TopoSwitch topoSwitch)
topoSwitch - a network switchpublic void addEdge(TopoEdge topoEdge)
topoEdge - public void addHost(TopoHost topoHost)
topoHost - A TopoHost instance.public java.util.Set<TopoSwitch> getSwitches()
getSwitches in interface TopoStoreInterfacepublic java.util.Set<TopoHost> getHosts()
getHosts in interface TopoStoreInterfacepublic TopoHost getTopoHostByMac(org.onlab.packet.MacAddress macAddress)
macAddress - macAddress of given host.public boolean checkHostExistenceWithIP(org.onlab.packet.Ip4Address ip4Address)
ip4Address - IPv4 address of a host.public boolean checkHostExistenceWithMac(org.onlab.packet.MacAddress macAddress)
macAddress - MAC address of a given host.public TopoHost getTopoHostByIP(org.onlab.packet.Ip4Address ipAddress)
ipAddress - IPv4 address of a host.public org.jgrapht.Graph<TopoVertex,TopoEdge> getGraph()
getGraph in interface TopoStoreInterfacepublic java.util.Set<TopoEdge> getTopoEdges()
public java.util.List<TopoEdge> getShortestPath(java.lang.String srcDevice, java.lang.String dstDevice)
srcDevice - source end point.dstDevice - destination end point.public void printPath(java.util.List<TopoEdge> path)
path - a path.public void printTopo()
printTopo in interface TopoStoreInterfacepublic void printLinks()
public void printHosts()
public void printDevices()