tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.flow; |
| 2 | |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame^] | 3 | import org.onlab.onos.net.DeviceId; |
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 | |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame^] | 11 | /** |
| 12 | * Instructs the provider to apply the specified flow rules to their |
| 13 | * respective devices. |
| 14 | * @param flowRules one or more flow rules |
| 15 | * throws SomeKindOfException that indicates which ones were applied and |
| 16 | * which ones failed |
| 17 | */ |
| 18 | void applyFlowRule(FlowRule... flowRules); |
| 19 | |
| 20 | |
| 21 | /** |
| 22 | * Returns the collection of flow entries currently applied on the given |
| 23 | * device. |
| 24 | * |
| 25 | * @param deviceId device identifier |
| 26 | * @return collection of flow entries |
| 27 | */ |
| 28 | Iterable<FlowEntry> getFlowMetrics(DeviceId deviceId); |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 29 | |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 30 | } |