blob: efbd48403a07c5dd6a2c2d17b507663df3547c85 [file] [log] [blame]
tom4774c8f2014-09-16 11:17:08 -07001package org.onlab.onos.net.path;
2
tomcbefa232014-09-16 14:17:20 -07003import org.onlab.onos.net.ElementId;
tom4774c8f2014-09-16 11:17:08 -07004import org.onlab.onos.net.Path;
5import org.onlab.onos.net.topology.LinkWeight;
6
7import java.util.Set;
8
9/**
10 * Service for obtaining pre-computed paths or for requesting computation of
11 * paths using the current topology snapshot.
12 */
13public interface PathService {
14
15 /**
16 * Returns the set of all shortest paths, precomputed in terms of hop-count,
tomcbefa232014-09-16 14:17:20 -070017 * between the specified source and destination elements.
tom4774c8f2014-09-16 11:17:08 -070018 *
tomcbefa232014-09-16 14:17:20 -070019 * @param src source element
20 * @param dst destination element
21 * @return set of all shortest paths between the two elements
tom4774c8f2014-09-16 11:17:08 -070022 */
tomcbefa232014-09-16 14:17:20 -070023 Set<Path> getPaths(ElementId src, ElementId dst);
tom4774c8f2014-09-16 11:17:08 -070024
25 /**
26 * Returns the set of all shortest paths, computed using the supplied
tomcbefa232014-09-16 14:17:20 -070027 * edge-weight entity, between the specified source and destination
28 * network elements.
tom4774c8f2014-09-16 11:17:08 -070029 *
tomcbefa232014-09-16 14:17:20 -070030 * @param src source element
31 * @param dst destination element
32 * @return set of all shortest paths between the two element
tom4774c8f2014-09-16 11:17:08 -070033 */
tomcbefa232014-09-16 14:17:20 -070034 Set<Path> getPaths(ElementId src, ElementId dst, LinkWeight weight);
tom4774c8f2014-09-16 11:17:08 -070035
36}