blob: 720474578bbadab62aec22def64ecb5eab837e82 [file] [log] [blame]
tom8bb16062014-09-12 14:47:46 -07001package org.onlab.onos.net.flow;
2
3import org.onlab.onos.net.DeviceId;
4
5import java.util.List;
6
7/**
8 * Represents a generalized match & action pair to be applied to
9 * an infrastucture device.
10 */
11public interface FlowRule {
12
13 /**
14 * Returns the flow rule priority given in natural order; higher numbers
15 * mean higher priorities.
16 *
17 * @return flow rule priority
18 */
19 int priority();
20
21 /**
22 * Returns the identity of the device where this rule applies.
23 *
24 * @return device identifier
25 */
26 DeviceId deviceId();
27
28 /**
29 * Returns the traffic selector that identifies what traffic this
30 * rule should apply to.
31 *
32 * @return traffic selector
33 */
34 TrafficSelector selector();
35
36 /**
37 * Returns the traffic treatment that applies to selected traffic.
38 *
39 * @return traffic treatment
40 */
41 List<Treatment> treatments();
42
43}