Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2014-present Open Networking Foundation |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 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 | */ |
Yi Tseng | 24d9be7 | 2017-05-12 11:28:13 -0700 | [diff] [blame] | 16 | package org.onosproject.net.intent; |
tom | 95329eb | 2014-10-06 08:40:06 -0700 | [diff] [blame] | 17 | |
Ray Milkey | f9af43c | 2015-02-09 16:45:48 -0800 | [diff] [blame] | 18 | import org.onosproject.net.NetworkResource; |
Ray Milkey | f9af43c | 2015-02-09 16:45:48 -0800 | [diff] [blame] | 19 | |
Thomas Vachuska | c46af20 | 2015-06-03 16:43:27 -0700 | [diff] [blame] | 20 | import java.util.Collection; |
| 21 | |
tom | 95329eb | 2014-10-06 08:40:06 -0700 | [diff] [blame] | 22 | /** |
| 23 | * Auxiliary service for tracking intent path flows and for notifying the |
| 24 | * intent service of environment changes via topology change delegate. |
| 25 | */ |
tom | 85258ee | 2014-10-07 00:10:02 -0700 | [diff] [blame] | 26 | public interface ObjectiveTrackerService { |
tom | 95329eb | 2014-10-06 08:40:06 -0700 | [diff] [blame] | 27 | |
| 28 | /** |
| 29 | * Sets a topology change delegate. |
| 30 | * |
| 31 | * @param delegate topology change delegate |
| 32 | */ |
| 33 | void setDelegate(TopologyChangeDelegate delegate); |
| 34 | |
| 35 | /** |
| 36 | * Unsets topology change delegate. |
| 37 | * |
| 38 | * @param delegate topology change delegate |
| 39 | */ |
| 40 | void unsetDelegate(TopologyChangeDelegate delegate); |
| 41 | |
| 42 | /** |
| 43 | * Adds a path flow to be tracked. |
| 44 | * |
Ray Milkey | f9af43c | 2015-02-09 16:45:48 -0800 | [diff] [blame] | 45 | * @param intentKey intent identity on whose behalf the path is being tracked |
tom | 95329eb | 2014-10-06 08:40:06 -0700 | [diff] [blame] | 46 | * @param resources resources to track |
| 47 | */ |
Ray Milkey | f9af43c | 2015-02-09 16:45:48 -0800 | [diff] [blame] | 48 | // TODO consider using the IntentData here rather than just the key |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 49 | void addTrackedResources(Key intentKey, |
Thomas Vachuska | b97cf28 | 2014-10-20 23:31:12 -0700 | [diff] [blame] | 50 | Collection<NetworkResource> resources); |
tom | 95329eb | 2014-10-06 08:40:06 -0700 | [diff] [blame] | 51 | |
| 52 | /** |
| 53 | * Removes a path flow to be tracked. |
| 54 | * |
Ray Milkey | f9af43c | 2015-02-09 16:45:48 -0800 | [diff] [blame] | 55 | * @param intentKey intent identity on whose behalf the path is being tracked |
tom | 95329eb | 2014-10-06 08:40:06 -0700 | [diff] [blame] | 56 | * @param resources resources to stop tracking |
| 57 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 58 | void removeTrackedResources(Key intentKey, |
Thomas Vachuska | b97cf28 | 2014-10-20 23:31:12 -0700 | [diff] [blame] | 59 | Collection<NetworkResource> resources); |
tom | 95329eb | 2014-10-06 08:40:06 -0700 | [diff] [blame] | 60 | |
Thomas Vachuska | c46af20 | 2015-06-03 16:43:27 -0700 | [diff] [blame] | 61 | /** |
| 62 | * Submits the specified intent data to be tracked. |
| 63 | * |
| 64 | * @param intentData intent data object to be tracked |
| 65 | */ |
| 66 | void trackIntent(IntentData intentData); |
tom | 95329eb | 2014-10-06 08:40:06 -0700 | [diff] [blame] | 67 | } |