blob: c4e2f926d321b6e03198142caa032e6a45ed3e2f [file] [log] [blame]
tom0eb04ca2014-08-25 14:34:51 -07001package org.onlab.onos.net.flow;
2
alshabiba68eb962014-09-24 20:34:13 -07003import org.onlab.onos.ApplicationId;
tomc1a38d32014-08-25 23:01:32 -07004import org.onlab.onos.net.provider.Provider;
tom0eb04ca2014-08-25 14:34:51 -07005
6/**
7 * Abstraction of a flow rule provider.
8 */
9public interface FlowRuleProvider extends Provider {
tome33cc1a2014-08-25 21:59:41 -070010
alshabibba5ac482014-10-02 17:15:20 -070011 static final int POLL_INTERVAL = 5;
12
tom8bb16062014-09-12 14:47:46 -070013 /**
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
alshabib57044ba2014-09-16 15:58:01 -070022 /**
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
alshabiba68eb962014-09-24 20:34:13 -070031 /**
32 * Removes rules by their id.
33 * @param id the id to remove
34 */
35 void removeRulesById(ApplicationId id, FlowRule... flowRules);
36
tom0eb04ca2014-08-25 14:34:51 -070037}