16 package org.openkilda.messaging.model;
20 import com.fasterxml.jackson.annotation.JsonCreator;
21 import com.fasterxml.jackson.annotation.JsonProperty;
24 import java.io.Serializable;
28 @JsonProperty(
"switch-id")
31 @JsonProperty(
"port-id")
32 private final Integer portNumber;
36 this.datapath = datapath;
37 this.portNumber = portNumber;
40 final void validateDatapath() {
42 throw new IllegalArgumentException(String.format(
"Invalid switch DPID: %s", datapath));
46 final void validatePortNumber() {
47 if (portNumber == null || portNumber < 0) {
48 throw new IllegalArgumentException(String.format(
"Invalid portId: %s", portNumber));
AbstractNetworkEndpoint(SwitchId datapath, Integer portNumber)
static boolean validateSwitchId(SwitchId switchId)