blob: 5c9e02cb13d63a0e671ead9bfdd5dbaddd88f24c [file] [log] [blame]
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -08001package net.floodlightcontroller.util;
2
3import net.floodlightcontroller.util.SwitchPort;
4
5/**
6 * The class representing the Data Path Endpoints.
7 */
8public class DataPathEndpoints {
9 private SwitchPort srcPort; // The source port
10 private SwitchPort dstPort; // The destination port
11
12 /**
13 * Default constructor.
14 */
15 public DataPathEndpoints() {
16 }
17
18 /**
19 * Constructor for given source and destination ports.
20 *
21 * @param srcPort the source port to use.
22 * @param dstPort the destination port to use.
23 */
24 public DataPathEndpoints(SwitchPort srcPort, SwitchPort dstPort) {
25 this.srcPort = srcPort;
26 this.dstPort = dstPort;
27 }
28
29 /**
30 * Get the data path source port.
31 *
32 * @return the data path source port.
33 */
34 public SwitchPort srcPort() { return srcPort; }
35
36 /**
37 * Set the data path source port.
38 *
39 * @param srcPort the data path source port to set.
40 */
41 public void setSrcPort(SwitchPort srcPort) {
42 this.srcPort = srcPort;
43 }
44
45 /**
46 * Get the data path destination port.
47 *
48 * @return the data path destination port.
49 */
50 public SwitchPort dstPort() { return dstPort; }
51
52 /**
53 * Set the data path destination port.
54 *
55 * @param dstPort the data path destination port to set.
56 */
57 public void setDstPort(SwitchPort dstPort) {
58 this.dstPort = dstPort;
59 }
60
61 /**
62 * Convert the data path endpoints to a string.
63 *
64 * @return the data path endpoints as a string.
65 */
66 @Override
67 public String toString() {
68 String ret = "";
69 // TODO: Implement it!
70 return ret;
71 }
72}