blob: c1d664b4aafcd570e7f04c3b54dc9eac8116969d [file] [log] [blame]
tom4774c8f2014-09-16 11:17:08 -07001package org.onlab.onos.net.path;
2
3import org.onlab.onos.net.DeviceId;
4import org.onlab.onos.net.HostId;
5import org.onlab.onos.net.Path;
6import org.onlab.onos.net.topology.LinkWeight;
7
8import java.util.Set;
9
10/**
11 * Service for obtaining pre-computed paths or for requesting computation of
12 * paths using the current topology snapshot.
13 */
14public interface PathService {
15
16 /**
17 * Returns the set of all shortest paths, precomputed in terms of hop-count,
18 * between the specified source and destination devices.
19 *
20 * @param src source device
21 * @param dst destination device
22 * @return set of all shortest paths between the two devices
23 */
24 Set<Path> getPaths(DeviceId src, DeviceId dst);
25
26 /**
27 * Returns the set of all shortest paths, computed using the supplied
28 * edge-weight entity, between the specified source and destination devices.
29 *
30 * @param src source device
31 * @param dst destination device
32 * @return set of all shortest paths between the two devices
33 */
34 Set<Path> getPaths(DeviceId src, DeviceId dst,
35 LinkWeight weight);
36
37
38 /**
39 * Returns the set of all shortest paths, precomputed in terms of hop-count,
40 * between the specified source and destination end-stations.
41 *
42 * @param src source device
43 * @param dst destination device
44 * @return set of all shortest paths between the two end-stations hosts
45 */
46 Set<Path> getPaths(HostId src, HostId dst);
47
48 /**
49 * Returns the set of all shortest paths, computed using the supplied
50 * edge-weight entity, between the specified source and end-stations.
51 *
52 * @param src source host
53 * @param dst destination host
54 * @return set of all shortest paths between the two end-station hosts
55 */
56 Set<Path> getPaths(HostId src, HostId dst, LinkWeight weight);
57
58}