blob: c4623b6f3da32f1a5ddfdd4023c741aa35d0eab7 [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
2 * Copyright 2014 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
tom210f3f32014-09-16 17:33:40 -070016package org.onlab.onos.net.topology;
tom4774c8f2014-09-16 11:17:08 -070017
tomcbefa232014-09-16 14:17:20 -070018import org.onlab.onos.net.ElementId;
tom4774c8f2014-09-16 11:17:08 -070019import org.onlab.onos.net.Path;
tom4774c8f2014-09-16 11:17:08 -070020
21import java.util.Set;
22
23/**
24 * Service for obtaining pre-computed paths or for requesting computation of
25 * paths using the current topology snapshot.
26 */
27public interface PathService {
28
29 /**
30 * Returns the set of all shortest paths, precomputed in terms of hop-count,
tomcbefa232014-09-16 14:17:20 -070031 * between the specified source and destination elements.
tom4774c8f2014-09-16 11:17:08 -070032 *
tomcbefa232014-09-16 14:17:20 -070033 * @param src source element
34 * @param dst destination element
35 * @return set of all shortest paths between the two elements
tom4774c8f2014-09-16 11:17:08 -070036 */
tomcbefa232014-09-16 14:17:20 -070037 Set<Path> getPaths(ElementId src, ElementId dst);
tom4774c8f2014-09-16 11:17:08 -070038
39 /**
40 * Returns the set of all shortest paths, computed using the supplied
tomcbefa232014-09-16 14:17:20 -070041 * edge-weight entity, between the specified source and destination
42 * network elements.
tom4774c8f2014-09-16 11:17:08 -070043 *
tomcbefa232014-09-16 14:17:20 -070044 * @param src source element
45 * @param dst destination element
46 * @return set of all shortest paths between the two element
tom4774c8f2014-09-16 11:17:08 -070047 */
tomcbefa232014-09-16 14:17:20 -070048 Set<Path> getPaths(ElementId src, ElementId dst, LinkWeight weight);
tom4774c8f2014-09-16 11:17:08 -070049
50}