Jonathan Hart | 309889c | 2013-08-13 23:26:24 +1200 | [diff] [blame] | 1 | package net.onrc.onos.ofcontroller.bgproute; |
| 2 | |
| 3 | import org.openflow.protocol.OFFlowMod; |
| 4 | |
Jonathan Hart | 08ee852 | 2013-09-22 17:34:43 +1200 | [diff] [blame^] | 5 | /** |
| 6 | * Wraps up a DPID and a OFFlowMod so we know how to delete |
| 7 | * the flow if we have to. |
| 8 | * |
| 9 | * TODO This functionality should be handled by ONOS's flow layer in future. |
| 10 | * |
| 11 | */ |
Jonathan Hart | 309889c | 2013-08-13 23:26:24 +1200 | [diff] [blame] | 12 | public class PushedFlowMod { |
| 13 | private long dpid; |
| 14 | private OFFlowMod flowMod; |
| 15 | |
| 16 | public PushedFlowMod(long dpid, OFFlowMod flowMod) { |
| 17 | this.dpid = dpid; |
| 18 | try { |
| 19 | this.flowMod = flowMod.clone(); |
| 20 | } catch (CloneNotSupportedException e) { |
| 21 | this.flowMod = flowMod; |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | public long getDpid() { |
| 26 | return dpid; |
| 27 | } |
| 28 | |
| 29 | public OFFlowMod getFlowMod() { |
| 30 | return flowMod; |
| 31 | } |
| 32 | } |