Thomas Vachuska | 83e090e | 2014-10-22 14:25:35 -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 | 83e090e | 2014-10-22 14:25:35 -0700 | [diff] [blame] | 3 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 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 |
Thomas Vachuska | 83e090e | 2014-10-22 14:25:35 -0700 | [diff] [blame] | 7 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 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. |
Thomas Vachuska | 83e090e | 2014-10-22 14:25:35 -0700 | [diff] [blame] | 15 | */ |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.net.flow; |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 17 | |
Ray Milkey | 7bf273c | 2017-09-27 16:15:15 -0700 | [diff] [blame] | 18 | import org.onosproject.net.flow.oldbatch.FlowRuleBatchOperation; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 19 | import org.onosproject.net.provider.Provider; |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 20 | |
| 21 | /** |
| 22 | * Abstraction of a flow rule provider. |
| 23 | */ |
| 24 | public interface FlowRuleProvider extends Provider { |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 25 | |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 26 | /** |
| 27 | * Instructs the provider to apply the specified flow rules to their |
| 28 | * respective devices. |
Thomas Vachuska | c4ee737 | 2016-02-02 16:10:09 -0800 | [diff] [blame] | 29 | * |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 30 | * @param flowRules one or more flow rules |
Thomas Vachuska | c4ee737 | 2016-02-02 16:10:09 -0800 | [diff] [blame] | 31 | * throws SomeKindOfException that indicates which ones were applied and |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 32 | * which ones failed |
| 33 | */ |
| 34 | void applyFlowRule(FlowRule... flowRules); |
| 35 | |
alshabib | 57044ba | 2014-09-16 15:58:01 -0700 | [diff] [blame] | 36 | /** |
| 37 | * Instructs the provider to remove the specified flow rules to their |
| 38 | * respective devices. |
Thomas Vachuska | c4ee737 | 2016-02-02 16:10:09 -0800 | [diff] [blame] | 39 | * |
alshabib | 57044ba | 2014-09-16 15:58:01 -0700 | [diff] [blame] | 40 | * @param flowRules one or more flow rules |
Thomas Vachuska | c4ee737 | 2016-02-02 16:10:09 -0800 | [diff] [blame] | 41 | * throws SomeKindOfException that indicates which ones were applied and |
alshabib | 57044ba | 2014-09-16 15:58:01 -0700 | [diff] [blame] | 42 | * which ones failed |
| 43 | */ |
| 44 | void removeFlowRule(FlowRule... flowRules); |
| 45 | |
alshabib | a68eb96 | 2014-09-24 20:34:13 -0700 | [diff] [blame] | 46 | /** |
alshabib | 193525b | 2014-10-08 18:58:03 -0700 | [diff] [blame] | 47 | * Installs a batch of flow rules. Each flowrule is associated to an |
| 48 | * operation which results in either addition, removal or modification. |
Thomas Vachuska | c4ee737 | 2016-02-02 16:10:09 -0800 | [diff] [blame] | 49 | * |
alshabib | 193525b | 2014-10-08 18:58:03 -0700 | [diff] [blame] | 50 | * @param batch a batch of flow rules |
alshabib | 193525b | 2014-10-08 18:58:03 -0700 | [diff] [blame] | 51 | */ |
Brian O'Connor | 72cb19a | 2015-01-16 16:14:41 -0800 | [diff] [blame] | 52 | void executeBatch(FlowRuleBatchOperation batch); |
alshabib | 902d41b | 2014-10-07 16:52:05 -0700 | [diff] [blame] | 53 | |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 54 | } |