tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.flow; |
| 2 | |
alshabib | a68eb96 | 2014-09-24 20:34:13 -0700 | [diff] [blame] | 3 | import org.onlab.onos.ApplicationId; |
tom | c1a38d3 | 2014-08-25 23:01:32 -0700 | [diff] [blame] | 4 | import org.onlab.onos.net.provider.Provider; |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 5 | |
| 6 | /** |
| 7 | * Abstraction of a flow rule provider. |
| 8 | */ |
| 9 | public interface FlowRuleProvider extends Provider { |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 10 | |
alshabib | ba5ac48 | 2014-10-02 17:15:20 -0700 | [diff] [blame] | 11 | static final int POLL_INTERVAL = 5; |
| 12 | |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 13 | /** |
| 14 | * Instructs the provider to apply the specified flow rules to their |
| 15 | * respective devices. |
| 16 | * @param flowRules one or more flow rules |
| 17 | * throws SomeKindOfException that indicates which ones were applied and |
| 18 | * which ones failed |
| 19 | */ |
| 20 | void applyFlowRule(FlowRule... flowRules); |
| 21 | |
alshabib | 57044ba | 2014-09-16 15:58:01 -0700 | [diff] [blame] | 22 | /** |
| 23 | * Instructs the provider to remove the specified flow rules to their |
| 24 | * respective devices. |
| 25 | * @param flowRules one or more flow rules |
| 26 | * throws SomeKindOfException that indicates which ones were applied and |
| 27 | * which ones failed |
| 28 | */ |
| 29 | void removeFlowRule(FlowRule... flowRules); |
| 30 | |
alshabib | a68eb96 | 2014-09-24 20:34:13 -0700 | [diff] [blame] | 31 | /** |
| 32 | * Removes rules by their id. |
| 33 | * @param id the id to remove |
| 34 | */ |
| 35 | void removeRulesById(ApplicationId id, FlowRule... flowRules); |
| 36 | |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 37 | } |