16 package org.openkilda.messaging.command.flow;
25 import com.fasterxml.jackson.annotation.JsonCreator;
26 import com.fasterxml.jackson.annotation.JsonInclude;
27 import com.fasterxml.jackson.annotation.JsonProperty;
28 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
33 @JsonInclude(JsonInclude.Include.NON_NULL)
43 @JsonProperty(TRANSACTION_ID)
44 protected Long transactionId;
49 @JsonProperty(FLOW_ID)
55 @JsonProperty("cookie")
56 protected Long cookie;
74 public
BaseFlow(@JsonProperty(TRANSACTION_ID) final Long transactionId,
75 @JsonProperty(FLOW_ID) final String
id,
76 @JsonProperty("cookie") final Long cookie,
78 setTransactionId(transactionId);
81 setSwitchId(switchId);
99 this.transactionId = transactionId;
116 public void setId(
final String
id) {
117 if (
id == null ||
id.isEmpty()) {
118 throw new IllegalArgumentException(
"flow id must be set");
138 this.cookie = cookie;
156 if (switchId == null) {
157 throw new IllegalArgumentException(
"need to set a switch_id");
159 throw new IllegalArgumentException(
"need to set valid value for switch_id");
161 this.switchId = switchId;
void setSwitchId(SwitchId switchId)
static boolean validateSwitchId(SwitchId switchId)
void setTransactionId(final Long transactionId)
static final String TRANSACTION_ID
void setId(final String id)
void setCookie(final Long cookie)
static final String FLOW_ID