blob: ca22c4f50a63f80843b7a06b4f9968888b066c2e [file] [log] [blame]
tom0eb04ca2014-08-25 14:34:51 -07001package org.onlab.onos.net.flow;
2
tom8bb16062014-09-12 14:47:46 -07003import org.onlab.onos.net.DeviceId;
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
tom8bb16062014-09-12 14:47:46 -070011 /**
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
alshabib57044ba2014-09-16 15:58:01 -070020 /**
21 * Instructs the provider to remove the specified flow rules to their
22 * respective devices.
23 * @param flowRules one or more flow rules
24 * throws SomeKindOfException that indicates which ones were applied and
25 * which ones failed
26 */
27 void removeFlowRule(FlowRule... flowRules);
28
tom8bb16062014-09-12 14:47:46 -070029
30 /**
31 * Returns the collection of flow entries currently applied on the given
32 * device.
33 *
34 * @param deviceId device identifier
35 * @return collection of flow entries
36 */
37 Iterable<FlowEntry> getFlowMetrics(DeviceId deviceId);
tome33cc1a2014-08-25 21:59:41 -070038
tom0eb04ca2014-08-25 14:34:51 -070039}