tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.flow; |
| 2 | |
| 3 | import org.onlab.onos.net.DeviceId; |
| 4 | |
| 5 | /** |
| 6 | * Service for injecting flow rules into the environment and for obtaining |
| 7 | * information about flow rules already in the environment. |
| 8 | */ |
| 9 | public interface FlowRuleService { |
| 10 | |
| 11 | /** |
| 12 | * Returns the collection of flow entries applied on the specified device. |
| 13 | * |
| 14 | * @param deviceId device identifier |
| 15 | * @return collection of flow rules |
| 16 | */ |
| 17 | Iterable<FlowEntry> getFlowEntries(DeviceId deviceId); |
| 18 | |
| 19 | /** |
| 20 | * Applies the specified flow rules onto their respective devices. |
| 21 | * |
| 22 | * @param flowRules one or more flow rules |
| 23 | * throws SomeKindOfException that indicates which ones were applied and |
| 24 | * which ones failed |
| 25 | */ |
| 26 | void applyFlowRules(FlowRule... flowRules); |
| 27 | |
| 28 | /** |
| 29 | * Adds the specified flow rule listener. |
| 30 | * |
| 31 | * @param listener flow rule listener |
| 32 | */ |
| 33 | void addListener(FlowRuleListener listener); |
| 34 | |
| 35 | /** |
| 36 | * Removes the specified flow rule listener. |
| 37 | * |
| 38 | * @param listener flow rule listener |
| 39 | */ |
| 40 | void removeListener(FlowRuleListener listener); |
| 41 | |
| 42 | } |