blob: 4e1211a2e88195ed40d9b743c5c743d492722296 [file] [log] [blame]
tomedf06bb2014-08-27 16:22:15 -07001package org.onlab.onos.net.topology;
2
3import org.onlab.onos.net.Topology;
4
5/**
6 * Service for providing network topology information.
7 */
8public interface TopologyService {
9
10 /**
11 * Returns the current topology descriptor.
12 *
13 * @return current topology
14 */
15 Topology currentTopology();
16
17 // TODO: Figure out hot to best export graph traversal methods via Graph/Vertex/Edge
18 // TODO: figure out how we want this to be presented, via Topology or via TopologyService
19 // Set<TopologyCluster> getClusters(Topology topology);
20 // Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst);
21 // Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst, LinkWeight weight);
22 // boolean isInfrastructure(Topology topology, ConnectPoint connectPoint);
23 // boolean isInBroadcastTree(Topology topology, ConnectPoint connectPoint);
24
25 /**
26 * Adds the specified topology listener.
27 *
28 * @param listener topology listener
29 */
30 void addListener(TopologyListener listener);
31
32 /**
33 * Removes the specified topology listener.
34 *
35 * @param listener topology listener
36 */
37 void removeListener(TopologyListener listener);
38
39}