blob: 7c87a10868c0a293286a1d9b0d05b9149802f423 [file] [log] [blame]
HIGUCHI Yuta356086e2013-06-12 15:21:19 -07001package net.onrc.onos.ofcontroller.util;
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -08002
Pavlin Radoslavov27831be2013-10-28 23:40:29 -07003import java.util.ArrayList;
4
HIGUCHI Yuta356086e2013-06-12 15:21:19 -07005import net.floodlightcontroller.util.MACAddress;
HIGUCHI Yuta20514902013-06-12 11:24:16 -07006import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IFlowEntry;
7import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IFlowPath;
Pavlin Radoslavovad008e02013-02-21 18:42:42 -08008
Pavlin Radoslavov892dd182013-12-05 23:33:15 -08009import org.codehaus.jackson.annotate.JsonIgnore;
Pavlin Radoslavovad008e02013-02-21 18:42:42 -080010import org.codehaus.jackson.annotate.JsonProperty;
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -080011
12/**
13 * The class representing the Flow Path.
14 */
Umesh Krishnaswamy57a32a92013-03-21 14:21:15 -070015public class FlowPath implements Comparable<FlowPath> {
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -080016 private FlowId flowId; // The Flow ID
17 private CallerId installerId; // The Caller ID of the path installer
Pavlin Radoslavovd28cf7c2013-10-26 11:27:43 -070018 private FlowPathType flowPathType; // The Flow Path type
Pavlin Radoslavov7d4a40e2013-10-27 23:39:40 -070019 private FlowPathUserState flowPathUserState; // The Flow Path User state
Pavlin Radoslavov204b2862013-07-12 14:15:36 -070020 private FlowPathFlags flowPathFlags; // The Flow Path flags
Pavlin Radoslavov5139c0b2013-12-09 18:04:53 -080021 private int idleTimeout; // The Flow idle timeout
22 private int hardTimeout; // The Flow hard timeout
23 private DataPath dataPath; // The data path
Pavlin Radoslavov67b3ef32013-04-03 02:44:48 -070024 private FlowEntryMatch flowEntryMatch; // Common Flow Entry Match for all
25 // Flow Entries
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -070026 private FlowEntryActions flowEntryActions; // The Flow Entry Actions for
27 // the first Flow Entry
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -080028
29 /**
30 * Default constructor.
31 */
32 public FlowPath() {
Pavlin Radoslavovd28cf7c2013-10-26 11:27:43 -070033 flowPathType = FlowPathType.FP_TYPE_UNKNOWN;
Pavlin Radoslavov7d4a40e2013-10-27 23:39:40 -070034 flowPathUserState = FlowPathUserState.FP_USER_UNKNOWN;
Pavlin Radoslavov204b2862013-07-12 14:15:36 -070035 flowPathFlags = new FlowPathFlags();
Pavlin Radoslavovb6f53542013-03-01 16:02:14 -080036 dataPath = new DataPath();
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -070037 flowEntryActions = new FlowEntryActions();
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -080038 }
Pavlin Radoslavov67b3ef32013-04-03 02:44:48 -070039
Pankaj Berde6a97eb82013-03-28 12:12:43 -070040 /**
41 * Constructor to instantiate from object in Network Map
42 */
43 public FlowPath(IFlowPath flowObj) {
44 dataPath = new DataPath();
45 this.setFlowId(new FlowId(flowObj.getFlowId()));
46 this.setInstallerId(new CallerId(flowObj.getInstallerId()));
Pavlin Radoslavovd28cf7c2013-10-26 11:27:43 -070047 this.setFlowPathType(FlowPathType.valueOf(flowObj.getFlowPathType()));
Pavlin Radoslavov7d4a40e2013-10-27 23:39:40 -070048 this.setFlowPathUserState(FlowPathUserState.valueOf(flowObj.getFlowPathUserState()));
Pavlin Radoslavov204b2862013-07-12 14:15:36 -070049 this.setFlowPathFlags(new FlowPathFlags(flowObj.getFlowPathFlags()));
Pavlin Radoslavov5139c0b2013-12-09 18:04:53 -080050 this.setIdleTimeout(flowObj.getIdleTimeout());
51 this.setHardTimeout(flowObj.getHardTimeout());
Pankaj Berde6a97eb82013-03-28 12:12:43 -070052 this.dataPath().srcPort().setDpid(new Dpid(flowObj.getSrcSwitch()));
53 this.dataPath().srcPort().setPort(new Port(flowObj.getSrcPort()));
54 this.dataPath().dstPort().setDpid(new Dpid(flowObj.getDstSwitch()));
55 this.dataPath().dstPort().setPort(new Port(flowObj.getDstPort()));
Pavlin Radoslavov67b3ef32013-04-03 02:44:48 -070056 //
57 // Extract the match conditions that are common for all Flow Entries
58 //
59 {
60 FlowEntryMatch match = new FlowEntryMatch();
Pavlin Radoslavov67b3ef32013-04-03 02:44:48 -070061 String matchSrcMac = flowObj.getMatchSrcMac();
62 if (matchSrcMac != null)
63 match.enableSrcMac(MACAddress.valueOf(matchSrcMac));
64 String matchDstMac = flowObj.getMatchDstMac();
65 if (matchDstMac != null)
66 match.enableDstMac(MACAddress.valueOf(matchDstMac));
Pavlin Radoslavovad3a1e62013-07-09 13:30:16 -070067 Short matchEthernetFrameType = flowObj.getMatchEthernetFrameType();
68 if (matchEthernetFrameType != null)
69 match.enableEthernetFrameType(matchEthernetFrameType);
70 Short matchVlanId = flowObj.getMatchVlanId();
71 if (matchVlanId != null)
72 match.enableVlanId(matchVlanId);
73 Byte matchVlanPriority = flowObj.getMatchVlanPriority();
74 if (matchVlanPriority != null)
75 match.enableVlanPriority(matchVlanPriority);
76 String matchSrcIPv4Net = flowObj.getMatchSrcIPv4Net();
77 if (matchSrcIPv4Net != null)
78 match.enableSrcIPv4Net(new IPv4Net(matchSrcIPv4Net));
79 String matchDstIPv4Net = flowObj.getMatchDstIPv4Net();
80 if (matchDstIPv4Net != null)
81 match.enableDstIPv4Net(new IPv4Net(matchDstIPv4Net));
82 Byte matchIpProto = flowObj.getMatchIpProto();
83 if (matchIpProto != null)
84 match.enableIpProto(matchIpProto);
85 Byte matchIpToS = flowObj.getMatchIpToS();
86 if (matchIpToS != null)
87 match.enableIpToS(matchIpToS);
88 Short matchSrcTcpUdpPort = flowObj.getMatchSrcTcpUdpPort();
89 if (matchSrcTcpUdpPort != null)
90 match.enableSrcTcpUdpPort(matchSrcTcpUdpPort);
91 Short matchDstTcpUdpPort = flowObj.getMatchDstTcpUdpPort();
92 if (matchDstTcpUdpPort != null)
93 match.enableDstTcpUdpPort(matchDstTcpUdpPort);
94
Pavlin Radoslavov67b3ef32013-04-03 02:44:48 -070095 this.setFlowEntryMatch(match);
96 }
Pankaj Berde6a97eb82013-03-28 12:12:43 -070097
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -070098 //
99 // Extract the actions for the first Flow Entry
100 //
101 {
102 FlowEntryActions actions = new FlowEntryActions();
103
104 String actionsStr = flowObj.getActions();
105 if (actions != null)
106 actions = new FlowEntryActions(actionsStr);
107
108 this.setFlowEntryActions(actions);
109 }
110
Pankaj Berde6a97eb82013-03-28 12:12:43 -0700111 //
112 // Extract all Flow Entries
113 //
114 Iterable<IFlowEntry> flowEntries = flowObj.getFlowEntries();
115 for (IFlowEntry flowEntryObj : flowEntries) {
116 FlowEntry flowEntry = new FlowEntry();
117 flowEntry.setFlowEntryId(new FlowEntryId(flowEntryObj.getFlowEntryId()));
118 flowEntry.setDpid(new Dpid(flowEntryObj.getSwitchDpid()));
119
120 //
121 // Extract the match conditions
122 //
123 FlowEntryMatch match = new FlowEntryMatch();
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -0700124 //
Pankaj Berde6a97eb82013-03-28 12:12:43 -0700125 Short matchInPort = flowEntryObj.getMatchInPort();
126 if (matchInPort != null)
127 match.enableInPort(new Port(matchInPort));
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -0700128 //
Pankaj Berde6a97eb82013-03-28 12:12:43 -0700129 String matchSrcMac = flowEntryObj.getMatchSrcMac();
130 if (matchSrcMac != null)
131 match.enableSrcMac(MACAddress.valueOf(matchSrcMac));
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -0700132 //
Pankaj Berde6a97eb82013-03-28 12:12:43 -0700133 String matchDstMac = flowEntryObj.getMatchDstMac();
134 if (matchDstMac != null)
135 match.enableDstMac(MACAddress.valueOf(matchDstMac));
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -0700136 //
Pavlin Radoslavovad3a1e62013-07-09 13:30:16 -0700137 Short matchEthernetFrameType = flowEntryObj.getMatchEthernetFrameType();
138 if (matchEthernetFrameType != null)
139 match.enableEthernetFrameType(matchEthernetFrameType);
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -0700140 //
Pavlin Radoslavovad3a1e62013-07-09 13:30:16 -0700141 Short matchVlanId = flowEntryObj.getMatchVlanId();
142 if (matchVlanId != null)
143 match.enableVlanId(matchVlanId);
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -0700144 //
Pavlin Radoslavovad3a1e62013-07-09 13:30:16 -0700145 Byte matchVlanPriority = flowEntryObj.getMatchVlanPriority();
146 if (matchVlanPriority != null)
147 match.enableVlanPriority(matchVlanPriority);
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -0700148 //
Pavlin Radoslavovad3a1e62013-07-09 13:30:16 -0700149 String matchSrcIPv4Net = flowEntryObj.getMatchSrcIPv4Net();
150 if (matchSrcIPv4Net != null)
151 match.enableSrcIPv4Net(new IPv4Net(matchSrcIPv4Net));
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -0700152 //
Pavlin Radoslavovad3a1e62013-07-09 13:30:16 -0700153 String matchDstIPv4Net = flowEntryObj.getMatchDstIPv4Net();
154 if (matchDstIPv4Net != null)
155 match.enableDstIPv4Net(new IPv4Net(matchDstIPv4Net));
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -0700156 //
Pavlin Radoslavovad3a1e62013-07-09 13:30:16 -0700157 Byte matchIpProto = flowEntryObj.getMatchIpProto();
158 if (matchIpProto != null)
159 match.enableIpProto(matchIpProto);
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -0700160 //
Pavlin Radoslavovad3a1e62013-07-09 13:30:16 -0700161 Byte matchIpToS = flowEntryObj.getMatchIpToS();
162 if (matchIpToS != null)
163 match.enableIpToS(matchIpToS);
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -0700164 //
Pavlin Radoslavovad3a1e62013-07-09 13:30:16 -0700165 Short matchSrcTcpUdpPort = flowEntryObj.getMatchSrcTcpUdpPort();
166 if (matchSrcTcpUdpPort != null)
167 match.enableSrcTcpUdpPort(matchSrcTcpUdpPort);
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -0700168 //
Pavlin Radoslavovad3a1e62013-07-09 13:30:16 -0700169 Short matchDstTcpUdpPort = flowEntryObj.getMatchDstTcpUdpPort();
170 if (matchDstTcpUdpPort != null)
171 match.enableDstTcpUdpPort(matchDstTcpUdpPort);
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -0700172 //
Pankaj Berde6a97eb82013-03-28 12:12:43 -0700173 flowEntry.setFlowEntryMatch(match);
174
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -0700175 //
176 // Extract the actions
177 //
178 {
179 FlowEntryActions actions = new FlowEntryActions();
180
HIGUCHI Yuta6fa39512013-08-04 06:00:47 +0900181 String actionsStr = flowEntryObj.getActions();
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -0700182 if (actions != null)
183 actions = new FlowEntryActions(actionsStr);
184
185 flowEntry.setFlowEntryActions(actions);
186 }
Pankaj Berde6a97eb82013-03-28 12:12:43 -0700187
188 String userState = flowEntryObj.getUserState();
189 flowEntry.setFlowEntryUserState(FlowEntryUserState.valueOf(userState));
190 String switchState = flowEntryObj.getSwitchState();
191 flowEntry.setFlowEntrySwitchState(FlowEntrySwitchState.valueOf(switchState));
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -0700192 //
193 // TODO: Take care of the FlowEntryErrorState.
194 //
Pankaj Berde6a97eb82013-03-28 12:12:43 -0700195 this.dataPath().flowEntries().add(flowEntry);
196 }
197 }
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -0800198
199 /**
200 * Get the flow path Flow ID.
201 *
202 * @return the flow path Flow ID.
203 */
Pavlin Radoslavov2013cbb2013-02-26 10:15:18 -0800204 @JsonProperty("flowId")
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -0800205 public FlowId flowId() { return flowId; }
206
207 /**
208 * Set the flow path Flow ID.
209 *
210 * @param flowId the flow path Flow ID to set.
211 */
Pavlin Radoslavov2013cbb2013-02-26 10:15:18 -0800212 @JsonProperty("flowId")
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -0800213 public void setFlowId(FlowId flowId) {
214 this.flowId = flowId;
215 }
216
217 /**
Pavlin Radoslavov892dd182013-12-05 23:33:15 -0800218 * Test whether the Flow ID is valid.
219 *
220 * @return true if the Flow ID is valid, otherwise false.
221 */
222 @JsonIgnore
223 public boolean isValidFlowId() {
224 if (this.flowId == null)
225 return false;
226 return (this.flowId.isValid());
227 }
228
229 /**
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -0800230 * Get the Caller ID of the flow path installer.
231 *
232 * @return the Caller ID of the flow path installer.
233 */
Pavlin Radoslavov2013cbb2013-02-26 10:15:18 -0800234 @JsonProperty("installerId")
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -0800235 public CallerId installerId() { return installerId; }
236
237 /**
238 * Set the Caller ID of the flow path installer.
239 *
240 * @param installerId the Caller ID of the flow path installer.
241 */
Pavlin Radoslavov2013cbb2013-02-26 10:15:18 -0800242 @JsonProperty("installerId")
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -0800243 public void setInstallerId(CallerId installerId) {
244 this.installerId = installerId;
245 }
246
247 /**
Pavlin Radoslavovd28cf7c2013-10-26 11:27:43 -0700248 * Get the flow path type.
249 *
250 * @return the flow path type.
251 */
252 @JsonProperty("flowPathType")
253 public FlowPathType flowPathType() { return flowPathType; }
254
255 /**
256 * Set the flow path type.
257 *
258 * @param flowPathType the flow path type to set.
259 */
260 @JsonProperty("flowPathType")
261 public void setFlowPathType(FlowPathType flowPathType) {
262 this.flowPathType = flowPathType;
263 }
264
265 /**
Pavlin Radoslavov7d4a40e2013-10-27 23:39:40 -0700266 * Get the flow path user state.
267 *
268 * @return the flow path user state.
269 */
270 @JsonProperty("flowPathUserState")
271 public FlowPathUserState flowPathUserState() { return flowPathUserState; }
272
273 /**
274 * Set the flow path user state.
275 *
276 * @param flowPathUserState the flow path user state to set.
277 */
278 @JsonProperty("flowPathUserState")
279 public void setFlowPathUserState(FlowPathUserState flowPathUserState) {
280 this.flowPathUserState = flowPathUserState;
281 }
282
283 /**
Pavlin Radoslavov204b2862013-07-12 14:15:36 -0700284 * Get the flow path flags.
285 *
286 * @return the flow path flags.
287 */
288 @JsonProperty("flowPathFlags")
289 public FlowPathFlags flowPathFlags() { return flowPathFlags; }
290
291 /**
292 * Set the flow path flags.
293 *
294 * @param flowPathFlags the flow path flags to set.
295 */
296 @JsonProperty("flowPathFlags")
297 public void setFlowPathFlags(FlowPathFlags flowPathFlags) {
298 this.flowPathFlags = flowPathFlags;
299 }
300
301 /**
Pavlin Radoslavov5139c0b2013-12-09 18:04:53 -0800302 * Get the flow idle timeout in seconds.
303 *
304 * It should be an unsigned integer in the interval [0, 65535].
305 * If zero, the timeout is not set.
306 *
307 * @return the flow idle timeout.
308 */
309 @JsonProperty("idleTimeout")
310 public int idleTimeout() { return idleTimeout; }
311
312 /**
313 * Set the flow idle timeout in seconds.
314 *
315 * It should be an unsigned integer in the interval [0, 65535].
316 * If zero, the timeout is not set.
317 *
318 * @param idleTimeout the flow idle timeout to set.
319 */
320 @JsonProperty("idleTimeout")
321 public void setIdleTimeout(int idleTimeout) {
322 this.idleTimeout = 0xffff & idleTimeout;
323 }
324
325 /**
326 * Get the flow hard timeout in seconds.
327 *
328 * It should be an unsigned integer in the interval [0, 65535].
329 * If zero, the timeout is not set.
330 *
331 * @return the flow hard timeout.
332 */
333 @JsonProperty("hardTimeout")
334 public int hardTimeout() { return hardTimeout; }
335
336 /**
337 * Set the flow hard timeout.
338 *
339 * It should be an unsigned integer in the interval [0, 65535].
340 * If zero, the timeout is not set.
341 *
342 * @param hardTimeout the flow hard timeout to set.
343 */
344 @JsonProperty("hardTimeout")
345 public void setHardTimeout(int hardTimeout) {
346 this.hardTimeout = 0xffff & hardTimeout;
347 }
348
349 /**
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -0800350 * Get the flow path's data path.
351 *
352 * @return the flow path's data path.
353 */
Pavlin Radoslavov2013cbb2013-02-26 10:15:18 -0800354 @JsonProperty("dataPath")
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -0800355 public DataPath dataPath() { return dataPath; }
356
357 /**
358 * Set the flow path's data path.
359 *
360 * @param dataPath the flow path's data path to set.
361 */
Pavlin Radoslavov2013cbb2013-02-26 10:15:18 -0800362 @JsonProperty("dataPath")
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -0800363 public void setDataPath(DataPath dataPath) {
364 this.dataPath = dataPath;
365 }
366
367 /**
Pavlin Radoslavov27831be2013-10-28 23:40:29 -0700368 * Get the data path flow entries.
369 *
370 * @return the data path flow entries.
371 */
372 public ArrayList<FlowEntry> flowEntries() {
373 return this.dataPath.flowEntries();
374 }
375
376 /**
Pavlin Radoslavov67b3ef32013-04-03 02:44:48 -0700377 * Get the flow path's match conditions common for all Flow Entries.
378 *
379 * @return the flow path's match conditions common for all Flow Entries.
380 */
381 @JsonProperty("flowEntryMatch")
382 public FlowEntryMatch flowEntryMatch() { return flowEntryMatch; }
383
384 /**
385 * Set the flow path's match conditions common for all Flow Entries.
386 *
387 * @param flowEntryMatch the flow path's match conditions common for all
388 * Flow Entries.
389 */
390 @JsonProperty("flowEntryMatch")
391 public void setFlowEntryMatch(FlowEntryMatch flowEntryMatch) {
392 this.flowEntryMatch = flowEntryMatch;
393 }
394
395 /**
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -0700396 * Get the flow path's flow entry actions for the first Flow Entry.
397 *
398 * @return the flow path's flow entry actions for the first Flow Entry.
399 */
400 @JsonProperty("flowEntryActions")
401 public FlowEntryActions flowEntryActions() {
402 return flowEntryActions;
403 }
404
405 /**
406 * Set the flow path's flow entry actions for the first Flow Entry.
407 *
408 * @param flowEntryActions the flow path's flow entry actions for the first
409 * Flow Entry.
410 */
411 @JsonProperty("flowEntryActions")
412 public void setFlowEntryActions(FlowEntryActions flowEntryActions) {
413 this.flowEntryActions = flowEntryActions;
414 }
415
416 /**
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -0800417 * Convert the flow path to a string.
418 *
Pavlin Radoslavova10a9a82013-02-22 11:47:54 -0800419 * The string has the following form:
Pavlin Radoslavov7d4a40e2013-10-27 23:39:40 -0700420 * [flowId=XXX installerId=XXX flowPathType = XXX flowPathUserState = XXX
Pavlin Radoslavov5139c0b2013-12-09 18:04:53 -0800421 * flowPathFlags=XXX idleTimeout=XXX hardTimeout=XXX dataPath=XXX
422 * flowEntryMatch=XXX flowEntryActions=XXX]
Pavlin Radoslavova10a9a82013-02-22 11:47:54 -0800423 *
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -0800424 * @return the flow path as a string.
425 */
426 @Override
427 public String toString() {
Pavlin Radoslavova10a9a82013-02-22 11:47:54 -0800428 String ret = "[flowId=" + this.flowId.toString();
429 ret += " installerId=" + this.installerId.toString();
Pavlin Radoslavovd28cf7c2013-10-26 11:27:43 -0700430 ret += " flowPathType=" + this.flowPathType;
Pavlin Radoslavov7d4a40e2013-10-27 23:39:40 -0700431 ret += " flowPathUserState=" + this.flowPathUserState;
Pavlin Radoslavov204b2862013-07-12 14:15:36 -0700432 ret += " flowPathFlags=" + this.flowPathFlags.toString();
Pavlin Radoslavov5139c0b2013-12-09 18:04:53 -0800433 ret += " idleTimeout=" + this.idleTimeout;
434 ret += " hardTimeout=" + this.hardTimeout;
Pavlin Radoslavov67b3ef32013-04-03 02:44:48 -0700435 if (dataPath != null)
436 ret += " dataPath=" + this.dataPath.toString();
437 if (flowEntryMatch != null)
438 ret += " flowEntryMatch=" + this.flowEntryMatch.toString();
Pavlin Radoslavov1bc2c472013-07-17 18:11:37 -0700439 if (flowEntryActions != null)
440 ret += " flowEntryActions=" + this.flowEntryActions.toString();
Pavlin Radoslavova10a9a82013-02-22 11:47:54 -0800441 ret += "]";
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -0800442 return ret;
443 }
Umesh Krishnaswamy57a32a92013-03-21 14:21:15 -0700444
445 /**
446 * CompareTo method to order flowPath by Id
447 */
448 @Override
449 public int compareTo(FlowPath f) {
450 return (int) (this.flowId.value() - f.flowId.value());
451 }
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -0800452}