blob: 51cdc4fff55f7f52a891d5f3e5a214c37fc5fb4a [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 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.net.intent.impl;
tom95329eb2014-10-06 08:40:06 -070017
Ray Milkeyf9af43c2015-02-09 16:45:48 -080018import org.onosproject.net.NetworkResource;
Thomas Vachuskac46af202015-06-03 16:43:27 -070019import org.onosproject.net.intent.IntentData;
Ray Milkeyf9af43c2015-02-09 16:45:48 -080020import org.onosproject.net.intent.Key;
21
Thomas Vachuskac46af202015-06-03 16:43:27 -070022import java.util.Collection;
23
tom95329eb2014-10-06 08:40:06 -070024/**
25 * Auxiliary service for tracking intent path flows and for notifying the
26 * intent service of environment changes via topology change delegate.
27 */
tom85258ee2014-10-07 00:10:02 -070028public interface ObjectiveTrackerService {
tom95329eb2014-10-06 08:40:06 -070029
30 /**
31 * Sets a topology change delegate.
32 *
33 * @param delegate topology change delegate
34 */
35 void setDelegate(TopologyChangeDelegate delegate);
36
37 /**
38 * Unsets topology change delegate.
39 *
40 * @param delegate topology change delegate
41 */
42 void unsetDelegate(TopologyChangeDelegate delegate);
43
44 /**
45 * Adds a path flow to be tracked.
46 *
Ray Milkeyf9af43c2015-02-09 16:45:48 -080047 * @param intentKey intent identity on whose behalf the path is being tracked
tom95329eb2014-10-06 08:40:06 -070048 * @param resources resources to track
49 */
Ray Milkeyf9af43c2015-02-09 16:45:48 -080050 // TODO consider using the IntentData here rather than just the key
Sho SHIMIZU3310a342015-05-13 12:14:05 -070051 void addTrackedResources(Key intentKey,
Thomas Vachuskab97cf282014-10-20 23:31:12 -070052 Collection<NetworkResource> resources);
tom95329eb2014-10-06 08:40:06 -070053
54 /**
55 * Removes a path flow to be tracked.
56 *
Ray Milkeyf9af43c2015-02-09 16:45:48 -080057 * @param intentKey intent identity on whose behalf the path is being tracked
tom95329eb2014-10-06 08:40:06 -070058 * @param resources resources to stop tracking
59 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070060 void removeTrackedResources(Key intentKey,
Thomas Vachuskab97cf282014-10-20 23:31:12 -070061 Collection<NetworkResource> resources);
tom95329eb2014-10-06 08:40:06 -070062
Thomas Vachuskac46af202015-06-03 16:43:27 -070063 /**
64 * Submits the specified intent data to be tracked.
65 *
66 * @param intentData intent data object to be tracked
67 */
68 void trackIntent(IntentData intentData);
tom95329eb2014-10-06 08:40:06 -070069}