alshabib | 7b2748f | 2014-09-16 20:21:11 -0700 | [diff] [blame^] | 1 | package org.onlab.onos.net.flow; |
| 2 | |
| 3 | import org.onlab.onos.net.DeviceId; |
| 4 | |
| 5 | public class DefaultFlowRule implements FlowRule { |
| 6 | |
| 7 | private final TrafficSelector selector; |
| 8 | private final TrafficTreatment treatment; |
| 9 | private final DeviceId deviceId; |
| 10 | |
| 11 | public DefaultFlowRule(DeviceId deviceId, |
| 12 | TrafficSelector selector, TrafficTreatment treatment) { |
| 13 | this.treatment = treatment; |
| 14 | this.selector = selector; |
| 15 | this.deviceId = deviceId; |
| 16 | } |
| 17 | |
| 18 | @Override |
| 19 | public int priority() { |
| 20 | return 0; |
| 21 | } |
| 22 | |
| 23 | @Override |
| 24 | public DeviceId deviceId() { |
| 25 | return deviceId; |
| 26 | } |
| 27 | |
| 28 | @Override |
| 29 | public TrafficSelector selector() { |
| 30 | return selector; |
| 31 | } |
| 32 | |
| 33 | @Override |
| 34 | public TrafficTreatment treatment() { |
| 35 | return treatment; |
| 36 | } |
| 37 | |
| 38 | } |