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