Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 1 | /* |
| 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 | */ |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.net.topology; |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 17 | |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 18 | import org.onosproject.net.ElementId; |
| 19 | import org.onosproject.net.Path; |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 20 | |
| 21 | import 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 | */ |
| 27 | public interface PathService { |
| 28 | |
| 29 | /** |
| 30 | * Returns the set of all shortest paths, precomputed in terms of hop-count, |
tom | cbefa23 | 2014-09-16 14:17:20 -0700 | [diff] [blame] | 31 | * between the specified source and destination elements. |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 32 | * |
tom | cbefa23 | 2014-09-16 14:17:20 -0700 | [diff] [blame] | 33 | * @param src source element |
| 34 | * @param dst destination element |
| 35 | * @return set of all shortest paths between the two elements |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 36 | */ |
tom | cbefa23 | 2014-09-16 14:17:20 -0700 | [diff] [blame] | 37 | Set<Path> getPaths(ElementId src, ElementId dst); |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 38 | |
| 39 | /** |
| 40 | * Returns the set of all shortest paths, computed using the supplied |
tom | cbefa23 | 2014-09-16 14:17:20 -0700 | [diff] [blame] | 41 | * edge-weight entity, between the specified source and destination |
| 42 | * network elements. |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 43 | * |
tom | cbefa23 | 2014-09-16 14:17:20 -0700 | [diff] [blame] | 44 | * @param src source element |
| 45 | * @param dst destination element |
Yuta HIGUCHI | 5c94727 | 2014-11-03 21:39:21 -0800 | [diff] [blame] | 46 | * @param weight edge-weight entity |
tom | cbefa23 | 2014-09-16 14:17:20 -0700 | [diff] [blame] | 47 | * @return set of all shortest paths between the two element |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 48 | */ |
tom | cbefa23 | 2014-09-16 14:17:20 -0700 | [diff] [blame] | 49 | Set<Path> getPaths(ElementId src, ElementId dst, LinkWeight weight); |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 50 | |
| 51 | } |