blob: b67fabee647264c88c954f7d75bbadd9a2f5ab42 [file] [log] [blame]
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -08001package net.floodlightcontroller.util;
2
3import net.floodlightcontroller.util.CallerId;
4import net.floodlightcontroller.util.DataPath;
5import net.floodlightcontroller.util.FlowId;
Pavlin Radoslavovad008e02013-02-21 18:42:42 -08006import net.floodlightcontroller.util.serializers.FlowPathSerializer;
7
8import org.codehaus.jackson.annotate.JsonProperty;
9import org.codehaus.jackson.map.annotate.JsonSerialize;
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -080010
11/**
12 * The class representing the Flow Path.
13 */
Pavlin Radoslavovad008e02013-02-21 18:42:42 -080014@JsonSerialize(using=FlowPathSerializer.class)
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -080015public class FlowPath {
16 private FlowId flowId; // The Flow ID
17 private CallerId installerId; // The Caller ID of the path installer
18 private DataPath dataPath; // The data path
19
20 /**
21 * Default constructor.
22 */
23 public FlowPath() {
24 }
25
26 /**
27 * Get the flow path Flow ID.
28 *
29 * @return the flow path Flow ID.
30 */
31 public FlowId flowId() { return flowId; }
32
33 /**
34 * Set the flow path Flow ID.
35 *
36 * @param flowId the flow path Flow ID to set.
37 */
38 public void setFlowId(FlowId flowId) {
39 this.flowId = flowId;
40 }
41
42 /**
43 * Get the Caller ID of the flow path installer.
44 *
45 * @return the Caller ID of the flow path installer.
46 */
47 public CallerId installerId() { return installerId; }
48
49 /**
50 * Set the Caller ID of the flow path installer.
51 *
52 * @param installerId the Caller ID of the flow path installer.
53 */
54 public void setInstallerId(CallerId installerId) {
55 this.installerId = installerId;
56 }
57
58 /**
59 * Get the flow path's data path.
60 *
61 * @return the flow path's data path.
62 */
63 public DataPath dataPath() { return dataPath; }
64
65 /**
66 * Set the flow path's data path.
67 *
68 * @param dataPath the flow path's data path to set.
69 */
70 public void setDataPath(DataPath dataPath) {
71 this.dataPath = dataPath;
72 }
73
74 /**
75 * Convert the flow path to a string.
76 *
77 * @return the flow path as a string.
78 */
79 @Override
80 public String toString() {
Pavlin Radoslavovad008e02013-02-21 18:42:42 -080081 String ret = "[flowId:" + this.flowId.toString();
82 ret += " installerId:" + this.installerId.toString();
83 ret += " dataPath:" + this.dataPath.toString();
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -080084 return ret;
85 }
86}