tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame^] | 1 | package org.onlab.onos.net.path; |
| 2 | |
| 3 | import org.onlab.onos.net.DeviceId; |
| 4 | import org.onlab.onos.net.HostId; |
| 5 | import org.onlab.onos.net.Path; |
| 6 | import org.onlab.onos.net.topology.LinkWeight; |
| 7 | |
| 8 | import 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 | */ |
| 14 | public 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 | } |