Jonathan Hart | 23701d1 | 2014-04-03 10:45:48 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.util; |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 2 | |
Pavlin Radoslavov | 27831be | 2013-10-28 23:40:29 -0700 | [diff] [blame] | 3 | import java.util.ArrayList; |
| 4 | |
Pavlin Radoslavov | 892dd18 | 2013-12-05 23:33:15 -0800 | [diff] [blame] | 5 | import org.codehaus.jackson.annotate.JsonIgnore; |
Pavlin Radoslavov | ad008e0 | 2013-02-21 18:42:42 -0800 | [diff] [blame] | 6 | import org.codehaus.jackson.annotate.JsonProperty; |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 7 | |
| 8 | /** |
| 9 | * The class representing the Flow Path. |
| 10 | */ |
Umesh Krishnaswamy | 57a32a9 | 2013-03-21 14:21:15 -0700 | [diff] [blame] | 11 | public class FlowPath implements Comparable<FlowPath> { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 12 | public static final int PRIORITY_DEFAULT = 32768; // Default Flow Priority |
Pavlin Radoslavov | afbf103 | 2014-02-04 10:37:52 -0800 | [diff] [blame] | 13 | |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 14 | private FlowId flowId; // The Flow ID |
| 15 | private CallerId installerId; // The Caller ID of the path installer |
| 16 | private FlowPathType flowPathType; // The Flow Path type |
Pavlin Radoslavov | 7d4a40e | 2013-10-27 23:39:40 -0700 | [diff] [blame] | 17 | private FlowPathUserState flowPathUserState; // The Flow Path User state |
Pavlin Radoslavov | 204b286 | 2013-07-12 14:15:36 -0700 | [diff] [blame] | 18 | private FlowPathFlags flowPathFlags; // The Flow Path flags |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 19 | private int idleTimeout; // The Flow idle timeout |
| 20 | private int hardTimeout; // The Flow hard timeout |
| 21 | private int priority; // The Flow priority |
| 22 | private DataPath dataPath; // The data path |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 23 | private FlowEntryMatch flowEntryMatch; // Common Flow Entry Match for all |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 24 | // Flow Entries |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 25 | private FlowEntryActions flowEntryActions; // The Flow Entry Actions for |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 26 | // the first Flow Entry |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 27 | |
| 28 | /** |
| 29 | * Default constructor. |
| 30 | */ |
| 31 | public FlowPath() { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 32 | flowPathType = FlowPathType.FP_TYPE_UNKNOWN; |
| 33 | flowPathUserState = FlowPathUserState.FP_USER_UNKNOWN; |
| 34 | flowPathFlags = new FlowPathFlags(); |
| 35 | priority = FlowPath.PRIORITY_DEFAULT; |
| 36 | dataPath = new DataPath(); |
| 37 | flowEntryActions = new FlowEntryActions(); |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 38 | } |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 39 | |
Pankaj Berde | 6a97eb8 | 2013-03-28 12:12:43 -0700 | [diff] [blame] | 40 | /** |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 41 | * Get the flow path Flow ID. |
| 42 | * |
| 43 | * @return the flow path Flow ID. |
| 44 | */ |
Pavlin Radoslavov | 2013cbb | 2013-02-26 10:15:18 -0800 | [diff] [blame] | 45 | @JsonProperty("flowId") |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 46 | public FlowId flowId() { |
| 47 | return flowId; |
| 48 | } |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 49 | |
| 50 | /** |
| 51 | * Set the flow path Flow ID. |
| 52 | * |
| 53 | * @param flowId the flow path Flow ID to set. |
| 54 | */ |
Pavlin Radoslavov | 2013cbb | 2013-02-26 10:15:18 -0800 | [diff] [blame] | 55 | @JsonProperty("flowId") |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 56 | public void setFlowId(FlowId flowId) { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 57 | this.flowId = flowId; |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 58 | } |
| 59 | |
| 60 | /** |
Pavlin Radoslavov | 892dd18 | 2013-12-05 23:33:15 -0800 | [diff] [blame] | 61 | * Test whether the Flow ID is valid. |
| 62 | * |
| 63 | * @return true if the Flow ID is valid, otherwise false. |
| 64 | */ |
| 65 | @JsonIgnore |
| 66 | public boolean isValidFlowId() { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 67 | if (this.flowId == null) |
| 68 | return false; |
| 69 | return (this.flowId.isValid()); |
Pavlin Radoslavov | 892dd18 | 2013-12-05 23:33:15 -0800 | [diff] [blame] | 70 | } |
| 71 | |
| 72 | /** |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 73 | * Get the Caller ID of the flow path installer. |
| 74 | * |
| 75 | * @return the Caller ID of the flow path installer. |
| 76 | */ |
Pavlin Radoslavov | 2013cbb | 2013-02-26 10:15:18 -0800 | [diff] [blame] | 77 | @JsonProperty("installerId") |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 78 | public CallerId installerId() { |
| 79 | return installerId; |
| 80 | } |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 81 | |
| 82 | /** |
| 83 | * Set the Caller ID of the flow path installer. |
| 84 | * |
| 85 | * @param installerId the Caller ID of the flow path installer. |
| 86 | */ |
Pavlin Radoslavov | 2013cbb | 2013-02-26 10:15:18 -0800 | [diff] [blame] | 87 | @JsonProperty("installerId") |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 88 | public void setInstallerId(CallerId installerId) { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 89 | this.installerId = installerId; |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 90 | } |
| 91 | |
| 92 | /** |
Pavlin Radoslavov | d28cf7c | 2013-10-26 11:27:43 -0700 | [diff] [blame] | 93 | * Get the flow path type. |
| 94 | * |
| 95 | * @return the flow path type. |
| 96 | */ |
| 97 | @JsonProperty("flowPathType") |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 98 | public FlowPathType flowPathType() { |
| 99 | return flowPathType; |
| 100 | } |
Pavlin Radoslavov | d28cf7c | 2013-10-26 11:27:43 -0700 | [diff] [blame] | 101 | |
| 102 | /** |
| 103 | * Set the flow path type. |
| 104 | * |
| 105 | * @param flowPathType the flow path type to set. |
| 106 | */ |
| 107 | @JsonProperty("flowPathType") |
| 108 | public void setFlowPathType(FlowPathType flowPathType) { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 109 | this.flowPathType = flowPathType; |
Pavlin Radoslavov | d28cf7c | 2013-10-26 11:27:43 -0700 | [diff] [blame] | 110 | } |
| 111 | |
| 112 | /** |
Pavlin Radoslavov | 7d4a40e | 2013-10-27 23:39:40 -0700 | [diff] [blame] | 113 | * Get the flow path user state. |
| 114 | * |
| 115 | * @return the flow path user state. |
| 116 | */ |
| 117 | @JsonProperty("flowPathUserState") |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 118 | public FlowPathUserState flowPathUserState() { |
| 119 | return flowPathUserState; |
| 120 | } |
Pavlin Radoslavov | 7d4a40e | 2013-10-27 23:39:40 -0700 | [diff] [blame] | 121 | |
| 122 | /** |
| 123 | * Set the flow path user state. |
| 124 | * |
| 125 | * @param flowPathUserState the flow path user state to set. |
| 126 | */ |
| 127 | @JsonProperty("flowPathUserState") |
| 128 | public void setFlowPathUserState(FlowPathUserState flowPathUserState) { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 129 | this.flowPathUserState = flowPathUserState; |
Pavlin Radoslavov | 7d4a40e | 2013-10-27 23:39:40 -0700 | [diff] [blame] | 130 | } |
| 131 | |
| 132 | /** |
Pavlin Radoslavov | 204b286 | 2013-07-12 14:15:36 -0700 | [diff] [blame] | 133 | * Get the flow path flags. |
| 134 | * |
| 135 | * @return the flow path flags. |
| 136 | */ |
| 137 | @JsonProperty("flowPathFlags") |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 138 | public FlowPathFlags flowPathFlags() { |
| 139 | return flowPathFlags; |
| 140 | } |
Pavlin Radoslavov | 204b286 | 2013-07-12 14:15:36 -0700 | [diff] [blame] | 141 | |
| 142 | /** |
| 143 | * Set the flow path flags. |
| 144 | * |
| 145 | * @param flowPathFlags the flow path flags to set. |
| 146 | */ |
| 147 | @JsonProperty("flowPathFlags") |
| 148 | public void setFlowPathFlags(FlowPathFlags flowPathFlags) { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 149 | this.flowPathFlags = flowPathFlags; |
Pavlin Radoslavov | 204b286 | 2013-07-12 14:15:36 -0700 | [diff] [blame] | 150 | } |
| 151 | |
| 152 | /** |
Pavlin Radoslavov | 5139c0b | 2013-12-09 18:04:53 -0800 | [diff] [blame] | 153 | * Get the flow idle timeout in seconds. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 154 | * <p/> |
Pavlin Radoslavov | 5139c0b | 2013-12-09 18:04:53 -0800 | [diff] [blame] | 155 | * It should be an unsigned integer in the interval [0, 65535]. |
| 156 | * If zero, the timeout is not set. |
| 157 | * |
| 158 | * @return the flow idle timeout. |
| 159 | */ |
| 160 | @JsonProperty("idleTimeout") |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 161 | public int idleTimeout() { |
| 162 | return idleTimeout; |
| 163 | } |
Pavlin Radoslavov | 5139c0b | 2013-12-09 18:04:53 -0800 | [diff] [blame] | 164 | |
| 165 | /** |
| 166 | * Set the flow idle timeout in seconds. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 167 | * <p/> |
Pavlin Radoslavov | 5139c0b | 2013-12-09 18:04:53 -0800 | [diff] [blame] | 168 | * It should be an unsigned integer in the interval [0, 65535]. |
| 169 | * If zero, the timeout is not set. |
| 170 | * |
| 171 | * @param idleTimeout the flow idle timeout to set. |
| 172 | */ |
| 173 | @JsonProperty("idleTimeout") |
| 174 | public void setIdleTimeout(int idleTimeout) { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 175 | this.idleTimeout = 0xffff & idleTimeout; |
Pavlin Radoslavov | 5139c0b | 2013-12-09 18:04:53 -0800 | [diff] [blame] | 176 | } |
| 177 | |
| 178 | /** |
| 179 | * Get the flow hard timeout in seconds. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 180 | * <p/> |
Pavlin Radoslavov | 5139c0b | 2013-12-09 18:04:53 -0800 | [diff] [blame] | 181 | * It should be an unsigned integer in the interval [0, 65535]. |
| 182 | * If zero, the timeout is not set. |
| 183 | * |
| 184 | * @return the flow hard timeout. |
| 185 | */ |
| 186 | @JsonProperty("hardTimeout") |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 187 | public int hardTimeout() { |
| 188 | return hardTimeout; |
| 189 | } |
Pavlin Radoslavov | 5139c0b | 2013-12-09 18:04:53 -0800 | [diff] [blame] | 190 | |
| 191 | /** |
| 192 | * Set the flow hard timeout. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 193 | * <p/> |
Pavlin Radoslavov | 5139c0b | 2013-12-09 18:04:53 -0800 | [diff] [blame] | 194 | * It should be an unsigned integer in the interval [0, 65535]. |
| 195 | * If zero, the timeout is not set. |
| 196 | * |
| 197 | * @param hardTimeout the flow hard timeout to set. |
| 198 | */ |
| 199 | @JsonProperty("hardTimeout") |
| 200 | public void setHardTimeout(int hardTimeout) { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 201 | this.hardTimeout = 0xffff & hardTimeout; |
Pavlin Radoslavov | 5139c0b | 2013-12-09 18:04:53 -0800 | [diff] [blame] | 202 | } |
| 203 | |
| 204 | /** |
Pavlin Radoslavov | afbf103 | 2014-02-04 10:37:52 -0800 | [diff] [blame] | 205 | * Get the flow priority. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 206 | * <p/> |
Pavlin Radoslavov | afbf103 | 2014-02-04 10:37:52 -0800 | [diff] [blame] | 207 | * It should be an unsigned integer in the interval [0, 65535]. |
| 208 | * |
| 209 | * @return the flow priority. |
| 210 | */ |
| 211 | @JsonProperty("priority") |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 212 | public int priority() { |
| 213 | return priority; |
| 214 | } |
Pavlin Radoslavov | afbf103 | 2014-02-04 10:37:52 -0800 | [diff] [blame] | 215 | |
| 216 | /** |
| 217 | * Set the flow priority. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 218 | * <p/> |
Pavlin Radoslavov | afbf103 | 2014-02-04 10:37:52 -0800 | [diff] [blame] | 219 | * It should be an unsigned integer in the interval [0, 65535]. |
| 220 | * |
| 221 | * @param priority the flow priority to set. |
| 222 | */ |
| 223 | @JsonProperty("priority") |
| 224 | public void setPriority(int priority) { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 225 | this.priority = 0xffff & priority; |
Pavlin Radoslavov | afbf103 | 2014-02-04 10:37:52 -0800 | [diff] [blame] | 226 | } |
| 227 | |
| 228 | /** |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 229 | * Get the flow path's data path. |
| 230 | * |
| 231 | * @return the flow path's data path. |
| 232 | */ |
Pavlin Radoslavov | 2013cbb | 2013-02-26 10:15:18 -0800 | [diff] [blame] | 233 | @JsonProperty("dataPath") |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 234 | public DataPath dataPath() { |
| 235 | return dataPath; |
| 236 | } |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 237 | |
| 238 | /** |
| 239 | * Set the flow path's data path. |
| 240 | * |
| 241 | * @param dataPath the flow path's data path to set. |
| 242 | */ |
Pavlin Radoslavov | 2013cbb | 2013-02-26 10:15:18 -0800 | [diff] [blame] | 243 | @JsonProperty("dataPath") |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 244 | public void setDataPath(DataPath dataPath) { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 245 | this.dataPath = dataPath; |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 246 | } |
| 247 | |
| 248 | /** |
Pavlin Radoslavov | 27831be | 2013-10-28 23:40:29 -0700 | [diff] [blame] | 249 | * Get the data path flow entries. |
| 250 | * |
| 251 | * @return the data path flow entries. |
| 252 | */ |
| 253 | public ArrayList<FlowEntry> flowEntries() { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 254 | return this.dataPath.flowEntries(); |
Pavlin Radoslavov | 27831be | 2013-10-28 23:40:29 -0700 | [diff] [blame] | 255 | } |
| 256 | |
| 257 | /** |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 258 | * Get the flow path's match conditions common for all Flow Entries. |
| 259 | * |
| 260 | * @return the flow path's match conditions common for all Flow Entries. |
| 261 | */ |
| 262 | @JsonProperty("flowEntryMatch") |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 263 | public FlowEntryMatch flowEntryMatch() { |
| 264 | return flowEntryMatch; |
| 265 | } |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 266 | |
| 267 | /** |
| 268 | * Set the flow path's match conditions common for all Flow Entries. |
| 269 | * |
| 270 | * @param flowEntryMatch the flow path's match conditions common for all |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 271 | * Flow Entries. |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 272 | */ |
| 273 | @JsonProperty("flowEntryMatch") |
| 274 | public void setFlowEntryMatch(FlowEntryMatch flowEntryMatch) { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 275 | this.flowEntryMatch = flowEntryMatch; |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 276 | } |
| 277 | |
| 278 | /** |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 279 | * Get the flow path's flow entry actions for the first Flow Entry. |
| 280 | * |
| 281 | * @return the flow path's flow entry actions for the first Flow Entry. |
| 282 | */ |
| 283 | @JsonProperty("flowEntryActions") |
| 284 | public FlowEntryActions flowEntryActions() { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 285 | return flowEntryActions; |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 286 | } |
| 287 | |
| 288 | /** |
| 289 | * Set the flow path's flow entry actions for the first Flow Entry. |
| 290 | * |
| 291 | * @param flowEntryActions the flow path's flow entry actions for the first |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 292 | * Flow Entry. |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 293 | */ |
| 294 | @JsonProperty("flowEntryActions") |
| 295 | public void setFlowEntryActions(FlowEntryActions flowEntryActions) { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 296 | this.flowEntryActions = flowEntryActions; |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 297 | } |
| 298 | |
| 299 | /** |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 300 | * Convert the flow path to a string. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 301 | * <p/> |
Pavlin Radoslavov | a10a9a8 | 2013-02-22 11:47:54 -0800 | [diff] [blame] | 302 | * The string has the following form: |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 303 | * [flowId=XXX installerId=XXX flowPathType = XXX flowPathUserState = XXX |
| 304 | * flowPathFlags=XXX idleTimeout=XXX hardTimeout=XXX priority=XXX |
| 305 | * dataPath=XXX flowEntryMatch=XXX flowEntryActions=XXX] |
Pavlin Radoslavov | a10a9a8 | 2013-02-22 11:47:54 -0800 | [diff] [blame] | 306 | * |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 307 | * @return the flow path as a string. |
| 308 | */ |
| 309 | @Override |
| 310 | public String toString() { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 311 | String ret = "[flowId=" + this.flowId.toString(); |
| 312 | ret += " installerId=" + this.installerId.toString(); |
| 313 | ret += " flowPathType=" + this.flowPathType; |
| 314 | ret += " flowPathUserState=" + this.flowPathUserState; |
| 315 | ret += " flowPathFlags=" + this.flowPathFlags.toString(); |
| 316 | ret += " idleTimeout=" + this.idleTimeout; |
| 317 | ret += " hardTimeout=" + this.hardTimeout; |
| 318 | ret += " priority=" + this.priority; |
| 319 | if (dataPath != null) |
| 320 | ret += " dataPath=" + this.dataPath.toString(); |
| 321 | if (flowEntryMatch != null) |
| 322 | ret += " flowEntryMatch=" + this.flowEntryMatch.toString(); |
| 323 | if (flowEntryActions != null) |
| 324 | ret += " flowEntryActions=" + this.flowEntryActions.toString(); |
| 325 | ret += "]"; |
| 326 | return ret; |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 327 | } |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 328 | |
Umesh Krishnaswamy | 57a32a9 | 2013-03-21 14:21:15 -0700 | [diff] [blame] | 329 | /** |
| 330 | * CompareTo method to order flowPath by Id |
| 331 | */ |
| 332 | @Override |
| 333 | public int compareTo(FlowPath f) { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 334 | return (int) (this.flowId.value() - f.flowId.value()); |
Umesh Krishnaswamy | 57a32a9 | 2013-03-21 14:21:15 -0700 | [diff] [blame] | 335 | } |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 336 | } |