Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 1 | package net.floodlightcontroller.util; |
| 2 | |
| 3 | import java.util.ArrayList; |
| 4 | |
| 5 | import net.floodlightcontroller.util.SwitchPort; |
| 6 | import net.floodlightcontroller.util.FlowEntry; |
| 7 | |
| 8 | /** |
| 9 | * The class representing the Data Path. |
| 10 | */ |
| 11 | public class DataPath { |
| 12 | private SwitchPort srcPort; // The source port |
| 13 | private SwitchPort dstPort; // The destination port |
| 14 | private ArrayList<FlowEntry> flowEntries; // The Flow Entries |
| 15 | |
| 16 | /** |
| 17 | * Default constructor. |
| 18 | */ |
| 19 | public DataPath() { |
| 20 | } |
| 21 | |
| 22 | /** |
| 23 | * Get the data path source port. |
| 24 | * |
| 25 | * @return the data path source port. |
| 26 | */ |
| 27 | public SwitchPort srcPort() { return srcPort; } |
| 28 | |
| 29 | /** |
| 30 | * Set the data path source port. |
| 31 | * |
| 32 | * @param srcPort the data path source port to set. |
| 33 | */ |
| 34 | public void setSrcPort(SwitchPort srcPort) { |
| 35 | this.srcPort = srcPort; |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * Get the data path destination port. |
| 40 | * |
| 41 | * @return the data path destination port. |
| 42 | */ |
| 43 | public SwitchPort dstPort() { return dstPort; } |
| 44 | |
| 45 | /** |
| 46 | * Set the data path destination port. |
| 47 | * |
| 48 | * @param dstPort the data path destination port to set. |
| 49 | */ |
| 50 | public void setDstPort(SwitchPort dstPort) { |
| 51 | this.dstPort = dstPort; |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Get the data path flow entries. |
| 56 | * |
| 57 | * @return the data path flow entries. |
| 58 | */ |
| 59 | public ArrayList<FlowEntry> flowEntries() { return flowEntries; } |
| 60 | |
| 61 | /** |
| 62 | * Set the data path flow entries. |
| 63 | * |
| 64 | * @param flowEntries the data path flow entries to set. |
| 65 | */ |
| 66 | public void setFlowEntries(ArrayList<FlowEntry> flowEntries) { |
| 67 | this.flowEntries = flowEntries; |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * Convert the data path to a string. |
| 72 | * |
| 73 | * @return the data path as a string. |
| 74 | */ |
| 75 | @Override |
| 76 | public String toString() { |
| 77 | String ret = ""; |
| 78 | // TODO: Implement it! |
| 79 | return ret; |
| 80 | } |
| 81 | } |