blob: 78a28ebbf7aab2c7749b8ce0c77e563040e01486 [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2014-present Open Networking Laboratory
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07003 *
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 Tseng24d9be72017-05-12 11:28:13 -070016package org.onosproject.net.intent;
tom95329eb2014-10-06 08:40:06 -070017
Ray Milkeyf9af43c2015-02-09 16:45:48 -080018import org.onosproject.net.NetworkResource;
Ray Milkeyf9af43c2015-02-09 16:45:48 -080019
Thomas Vachuskac46af202015-06-03 16:43:27 -070020import java.util.Collection;
21
tom95329eb2014-10-06 08:40:06 -070022/**
23 * Auxiliary service for tracking intent path flows and for notifying the
24 * intent service of environment changes via topology change delegate.
25 */
tom85258ee2014-10-07 00:10:02 -070026public interface ObjectiveTrackerService {
tom95329eb2014-10-06 08:40:06 -070027
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 Milkeyf9af43c2015-02-09 16:45:48 -080045 * @param intentKey intent identity on whose behalf the path is being tracked
tom95329eb2014-10-06 08:40:06 -070046 * @param resources resources to track
47 */
Ray Milkeyf9af43c2015-02-09 16:45:48 -080048 // TODO consider using the IntentData here rather than just the key
Sho SHIMIZU3310a342015-05-13 12:14:05 -070049 void addTrackedResources(Key intentKey,
Thomas Vachuskab97cf282014-10-20 23:31:12 -070050 Collection<NetworkResource> resources);
tom95329eb2014-10-06 08:40:06 -070051
52 /**
53 * Removes a path flow to be tracked.
54 *
Ray Milkeyf9af43c2015-02-09 16:45:48 -080055 * @param intentKey intent identity on whose behalf the path is being tracked
tom95329eb2014-10-06 08:40:06 -070056 * @param resources resources to stop tracking
57 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070058 void removeTrackedResources(Key intentKey,
Thomas Vachuskab97cf282014-10-20 23:31:12 -070059 Collection<NetworkResource> resources);
tom95329eb2014-10-06 08:40:06 -070060
Thomas Vachuskac46af202015-06-03 16:43:27 -070061 /**
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);
tom95329eb2014-10-06 08:40:06 -070067}