Rename Port to PortNumber
Current util.Port actually only represent a port number.
Renaming it to PortNumber, so that it matches what it actually reprsent.
- Updated javadoc
- Removed unnecessary hashCode calculation
- Hide default constructor from public
Change-Id: Ib26c746eaa27464356c4ca0abff6af5e321afc35
diff --git a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
index 43d19be..830998c 100644
--- a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
+++ b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
@@ -39,6 +39,7 @@
import net.onrc.onos.core.topology.Topology;
import net.onrc.onos.core.util.Dpid;
import net.onrc.onos.core.util.FlowPath;
+import net.onrc.onos.core.util.PortNumber;
import net.onrc.onos.core.util.SwitchPort;
import org.openflow.util.HexString;
@@ -340,10 +341,10 @@
// TODO eliminate cast
SwitchPort srcSwitchPort = new SwitchPort(
new Dpid(sw.getDpid()),
- new net.onrc.onos.core.util.Port((short) inPort.getNumber().longValue()));
+ new PortNumber((short) inPort.getNumber().longValue()));
SwitchPort dstSwitchPort = new SwitchPort(
new Dpid(destinationDpid),
- new net.onrc.onos.core.util.Port(destinationPort));
+ new PortNumber(destinationPort));
MACAddress srcMacAddress = MACAddress.valueOf(eth.getSourceMACAddress());
MACAddress dstMacAddress = MACAddress.valueOf(eth.getDestinationMACAddress());
diff --git a/src/main/java/net/onrc/onos/apps/sdnip/Interface.java b/src/main/java/net/onrc/onos/apps/sdnip/Interface.java
index b906ba6..de3b48c 100644
--- a/src/main/java/net/onrc/onos/apps/sdnip/Interface.java
+++ b/src/main/java/net/onrc/onos/apps/sdnip/Interface.java
@@ -3,7 +3,7 @@
import java.net.InetAddress;
import net.onrc.onos.core.util.Dpid;
-import net.onrc.onos.core.util.Port;
+import net.onrc.onos.core.util.PortNumber;
import net.onrc.onos.core.util.SwitchPort;
import org.codehaus.jackson.annotate.JsonCreator;
@@ -73,7 +73,7 @@
public SwitchPort getSwitchPort() {
//TODO SwitchPort, Dpid and Port are mutable, but they could probably
//be made immutable which would prevent the need to copy
- return new SwitchPort(new Dpid(dpid), new Port(port));
+ return new SwitchPort(new Dpid(dpid), new PortNumber(port));
}
/**
diff --git a/src/main/java/net/onrc/onos/apps/sdnip/SdnIp.java b/src/main/java/net/onrc/onos/apps/sdnip/SdnIp.java
index 4dff135..3b56468 100644
--- a/src/main/java/net/onrc/onos/apps/sdnip/SdnIp.java
+++ b/src/main/java/net/onrc/onos/apps/sdnip/SdnIp.java
@@ -52,7 +52,7 @@
import net.onrc.onos.core.util.FlowPathType;
import net.onrc.onos.core.util.FlowPathUserState;
import net.onrc.onos.core.util.IPv4Net;
-import net.onrc.onos.core.util.Port;
+import net.onrc.onos.core.util.PortNumber;
import net.onrc.onos.core.util.SwitchPort;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@@ -219,7 +219,7 @@
bgpdAttachmentPoint = new SwitchPort(
new Dpid(config.getBgpdAttachmentDpid()),
- new Port(config.getBgpdAttachmentPort()));
+ new PortNumber(config.getBgpdAttachmentPort()));
bgpdMacAddress = config.getBgpdMacAddress();
vlan = config.getVlan();
@@ -542,7 +542,7 @@
// Create the DataPath object: dstSwitchPort
SwitchPort dstPort =
new SwitchPort(new Dpid(egressInterface.getDpid()),
- new Port(egressInterface.getPort()));
+ new PortNumber(egressInterface.getPort()));
// We only need one flow mod per switch, so pick one interface on each switch
Map<Long, Interface> srcInterfaces = new HashMap<Long, Interface>();
@@ -564,7 +564,7 @@
// Create DataPath object: srcSwitchPort
SwitchPort srcPort =
new SwitchPort(new Dpid(srcInterface.getDpid()),
- new Port(srcInterface.getPort()));
+ new PortNumber(srcInterface.getPort()));
DataPath dataPath = new DataPath();
dataPath.setSrcPort(srcPort);
@@ -774,7 +774,7 @@
// Create the DataPath object: dstSwitchPort
SwitchPort dstPort =
new SwitchPort(new Dpid(dstInterface.getDpid()),
- new Port(dstInterface.getPort()));
+ new PortNumber(dstInterface.getPort()));
for (Interface srcInterface : interfaces.values()) {
@@ -788,7 +788,7 @@
// Create the DataPath object: srcSwitchPort
SwitchPort srcPort =
new SwitchPort(new Dpid(srcInterface.getDpid()),
- new Port(srcInterface.getPort()));
+ new PortNumber(srcInterface.getPort()));
DataPath dataPath = new DataPath();
dataPath.setSrcPort(srcPort);
@@ -863,7 +863,7 @@
bgpdAttachmentPoint.port());
SwitchPort dstPort =
new SwitchPort(new Dpid(peerInterface.getDpid()),
- new Port(peerInterface.getSwitchPort().port()));
+ new PortNumber(peerInterface.getSwitchPort().port()));
ShortestPathIntent fwdIntent = new ShortestPathIntent(fwdIntentId,
srcPort.dpid().value(), srcPort.port().value(), ShortestPathIntent.EMPTYMACADDRESS, srcIP,
dstPort.dpid().value(), dstPort.port().value(), ShortestPathIntent.EMPTYMACADDRESS, dstIP);
@@ -929,7 +929,7 @@
SwitchPort dstPort =
new SwitchPort(new Dpid(peerInterface.getDpid()),
- new Port(peerInterface.getSwitchPort().port()));
+ new PortNumber(peerInterface.getSwitchPort().port()));
dataPath.setDstPort(dstPort);
flowPath.setDataPath(dataPath);
@@ -981,7 +981,7 @@
SwitchPort reverseSrcPort =
new SwitchPort(new Dpid(peerInterface.getDpid()),
- new Port(peerInterface.getSwitchPort().port()));
+ new PortNumber(peerInterface.getSwitchPort().port()));
reverseDataPath.setSrcPort(reverseSrcPort);
flowPath.setDataPath(reverseDataPath);
diff --git a/src/main/java/net/onrc/onos/core/datagrid/web/GetNGFlowsSummaryResource.java b/src/main/java/net/onrc/onos/core/datagrid/web/GetNGFlowsSummaryResource.java
index e487f86..1f143cb 100644
--- a/src/main/java/net/onrc/onos/core/datagrid/web/GetNGFlowsSummaryResource.java
+++ b/src/main/java/net/onrc/onos/core/datagrid/web/GetNGFlowsSummaryResource.java
@@ -19,7 +19,7 @@
import net.onrc.onos.core.util.FlowPath;
import net.onrc.onos.core.util.FlowPathType;
import net.onrc.onos.core.util.FlowPathUserState;
-import net.onrc.onos.core.util.Port;
+import net.onrc.onos.core.util.PortNumber;
import net.onrc.onos.core.util.SwitchPort;
import org.restlet.resource.Get;
@@ -84,9 +84,9 @@
// Setup the Source and Destination DPID and Port
Dpid srcDpid = new Dpid(spIntent.getSrcSwitchDpid());
- Port srcPort = new Port((short) spIntent.getSrcPortNumber());
+ PortNumber srcPort = new PortNumber((short) spIntent.getSrcPortNumber());
Dpid dstDpid = new Dpid(spIntent.getDstSwitchDpid());
- Port dstPort = new Port((short) spIntent.getDstPortNumber());
+ PortNumber dstPort = new PortNumber((short) spIntent.getDstPortNumber());
SwitchPort srcSwitchPort = new SwitchPort(srcDpid, srcPort);
SwitchPort dstSwitchPort = new SwitchPort(dstDpid, dstPort);
flowPath.dataPath().setSrcPort(srcSwitchPort);
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
index bd41a95..b27e0fd 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
@@ -43,7 +43,7 @@
import net.onrc.onos.core.util.FlowEntryUserState;
import net.onrc.onos.core.util.IPv4Net;
import net.onrc.onos.core.util.Pair;
-import net.onrc.onos.core.util.Port;
+import net.onrc.onos.core.util.PortNumber;
import org.openflow.protocol.OFBarrierReply;
import org.openflow.protocol.OFBarrierRequest;
@@ -668,7 +668,7 @@
match.setWildcards(OFMatch.OFPFW_ALL);
// Match the Incoming Port
- Port matchInPort = flowEntryMatch.inPort();
+ PortNumber matchInPort = flowEntryMatch.inPort();
if (matchInPort != null) {
match.setInputPort(matchInPort.value());
match.setWildcards(match.getWildcards() & ~OFMatch.OFPFW_IN_PORT);
@@ -904,7 +904,7 @@
final FlowEntryMatch flowEntryMatch = flowEntry.flowEntryMatch();
final OFMatch match = computeMatch(flowEntryMatch);
- final Port matchInPort = flowEntryMatch.inPort();
+ final PortNumber matchInPort = flowEntryMatch.inPort();
final MACAddress matchSrcMac = flowEntryMatch.srcMac();
final MACAddress matchDstMac = flowEntryMatch.dstMac();
diff --git a/src/main/java/net/onrc/onos/core/intent/ForwardAction.java b/src/main/java/net/onrc/onos/core/intent/ForwardAction.java
index 373d13c..ef6dd00 100644
--- a/src/main/java/net/onrc/onos/core/intent/ForwardAction.java
+++ b/src/main/java/net/onrc/onos/core/intent/ForwardAction.java
@@ -1,6 +1,7 @@
package net.onrc.onos.core.intent;
import net.onrc.onos.core.util.FlowEntryAction;
+import net.onrc.onos.core.util.PortNumber;
/**
* A class to represent the OpenFlow forwarding action.
@@ -23,6 +24,7 @@
*
* @return the destination port as a String
*/
+ @Override
public String toString() {
return Long.toString(dstPort);
}
@@ -35,7 +37,7 @@
@Override
public FlowEntryAction getFlowEntryAction() {
FlowEntryAction action = new FlowEntryAction();
- action.setActionOutput(new net.onrc.onos.core.util.Port((short) dstPort));
+ action.setActionOutput(new PortNumber((short) dstPort));
return action;
}
@@ -44,6 +46,7 @@
*
* @return hashcode
*/
+ @Override
public int hashCode() {
return (int) dstPort;
}
@@ -54,6 +57,7 @@
* @param o another object to compare to this
* @return true if equal, false otherwise
*/
+ @Override
public boolean equals(Object o) {
if (!(o instanceof ForwardAction)) {
return false;
diff --git a/src/main/java/net/onrc/onos/core/intent/Match.java b/src/main/java/net/onrc/onos/core/intent/Match.java
index 0731395..cddd6de 100644
--- a/src/main/java/net/onrc/onos/core/intent/Match.java
+++ b/src/main/java/net/onrc/onos/core/intent/Match.java
@@ -8,6 +8,7 @@
import net.onrc.onos.core.util.FlowEntryMatch;
import net.onrc.onos.core.util.IPv4;
import net.onrc.onos.core.util.IPv4Net;
+import net.onrc.onos.core.util.PortNumber;
/**
* A class to represent the OpenFlow match.
@@ -125,7 +126,7 @@
IPv4Net dstIP = new IPv4Net(dstIPv4, IPV4_PREFIX_LEN);
match.enableDstIPv4Net(dstIP);
}
- match.enableInPort(new net.onrc.onos.core.util.Port((short) srcPort));
+ match.enableInPort(new PortNumber((short) srcPort));
return match;
}
diff --git a/src/main/java/net/onrc/onos/core/util/FlowEntry.java b/src/main/java/net/onrc/onos/core/util/FlowEntry.java
index 768f942..4d1eb45 100644
--- a/src/main/java/net/onrc/onos/core/util/FlowEntry.java
+++ b/src/main/java/net/onrc/onos/core/util/FlowEntry.java
@@ -19,10 +19,10 @@
private FlowEntryMatch flowEntryMatch; // The Flow Entry Match
private FlowEntryActions flowEntryActions; // The Flow Entry Actions
private Dpid dpid; // The Switch DPID
- private Port inPort; // The Switch incoming port. Used only
+ private PortNumber inPort; // The Switch incoming port. Used only
// when the entry is used to return
// Shortest Path computation.
- private Port outPort; // The Switch outgoing port. Used only
+ private PortNumber outPort; // The Switch outgoing port. Used only
// when the entry is used to return
// Shortest Path computation.
private FlowEntryUserState flowEntryUserState; // The Flow Entry User state
@@ -327,7 +327,7 @@
* @return the Switch incoming port.
*/
@JsonProperty("inPort")
- public Port inPort() {
+ public PortNumber inPort() {
return inPort;
}
@@ -339,7 +339,7 @@
* @param inPort the Switch incoming port to set.
*/
@JsonProperty("inPort")
- public void setInPort(Port inPort) {
+ public void setInPort(PortNumber inPort) {
this.inPort = inPort;
}
@@ -351,7 +351,7 @@
* @return the Switch outgoing port.
*/
@JsonProperty("outPort")
- public Port outPort() {
+ public PortNumber outPort() {
return outPort;
}
@@ -363,7 +363,7 @@
* @param outPort the Switch outgoing port to set.
*/
@JsonProperty("outPort")
- public void setOutPort(Port outPort) {
+ public void setOutPort(PortNumber outPort) {
this.outPort = outPort;
}
diff --git a/src/main/java/net/onrc/onos/core/util/FlowEntryAction.java b/src/main/java/net/onrc/onos/core/util/FlowEntryAction.java
index 16b9d27..dd7bdbd 100644
--- a/src/main/java/net/onrc/onos/core/util/FlowEntryAction.java
+++ b/src/main/java/net/onrc/onos/core/util/FlowEntryAction.java
@@ -58,7 +58,7 @@
* Action structure for ACTION_OUTPUT: Output to switch port.
*/
public static class ActionOutput {
- private Port port; // Output port
+ private PortNumber port; // Output port
private short maxLen; // Max. length (in bytes) to send to controller
// if the port is set to PORT_CONTROLLER
@@ -77,7 +77,7 @@
*/
public ActionOutput(ActionOutput other) {
if (other.port != null) {
- this.port = new Port(other.port);
+ this.port = new PortNumber(other.port);
}
this.maxLen = other.maxLen;
}
@@ -101,7 +101,7 @@
* @param maxLen the maximum length (in bytes) to send to controller
* if the port is set to PORT_CONTROLLER.
*/
- public ActionOutput(Port port, short maxLen) {
+ public ActionOutput(PortNumber port, short maxLen) {
this.port = port;
this.maxLen = maxLen;
}
@@ -111,7 +111,7 @@
*
* @param port the output port to set.
*/
- public ActionOutput(Port port) {
+ public ActionOutput(PortNumber port) {
this.port = port;
this.maxLen = 0;
}
@@ -122,7 +122,7 @@
* @return the output port.
*/
@JsonProperty("port")
- public Port port() {
+ public PortNumber port() {
return this.port;
}
@@ -177,7 +177,7 @@
if (tokens.length > 1 && tokens[1] != null) {
try {
Short valueShort = Short.valueOf(tokens[1]);
- port = new Port(valueShort);
+ port = new PortNumber(valueShort);
} catch (NumberFormatException e) {
throw new IllegalArgumentException("Invalid action string");
}
@@ -908,7 +908,7 @@
* Action structure for ACTION_ENQUEUE: Output to queue on port.
*/
public static class ActionEnqueue {
- private Port port; // Port that queue belongs. Should
+ private PortNumber port; // Port that queue belongs. Should
// refer to a valid physical port
// (i.e. < PORT_MAX) or PORT_IN_PORT
private int queueId; // Where to enqueue the packets
@@ -928,7 +928,7 @@
*/
public ActionEnqueue(ActionEnqueue other) {
if (other.port != null) {
- this.port = new Port(other.port);
+ this.port = new PortNumber(other.port);
}
this.queueId = other.queueId;
}
@@ -951,7 +951,7 @@
* @param port the port to set.
* @param queueId the queue ID on the port.
*/
- public ActionEnqueue(Port port, int queueId) {
+ public ActionEnqueue(PortNumber port, int queueId) {
this.port = port;
this.queueId = queueId;
}
@@ -962,7 +962,7 @@
* @return the port.
*/
@JsonProperty("port")
- public Port port() {
+ public PortNumber port() {
return this.port;
}
@@ -1015,7 +1015,7 @@
if (tokens.length > 1 && tokens[1] != null) {
try {
Short valueShort = Short.valueOf(tokens[1]);
- port = new Port(valueShort);
+ port = new PortNumber(valueShort);
} catch (NumberFormatException e) {
throw new IllegalArgumentException("Invalid action string");
}
@@ -1201,7 +1201,7 @@
*
* @param port the output port to set.
*/
- public void setActionOutput(Port port) {
+ public void setActionOutput(PortNumber port) {
actionOutput = new ActionOutput(port);
actionType = ActionValues.ACTION_OUTPUT;
}
@@ -1212,7 +1212,7 @@
* @param maxLen the maximum length (in bytes) to send to controller.
*/
public void setActionOutputToController(short maxLen) {
- Port port = new Port(Port.PortValues.PORT_CONTROLLER);
+ PortNumber port = new PortNumber(PortNumber.PortValues.PORT_CONTROLLER);
actionOutput = new ActionOutput(port, maxLen);
actionType = ActionValues.ACTION_OUTPUT;
}
@@ -1554,7 +1554,7 @@
* @param port the port to set.
* @param queueId the queue ID to set.
*/
- public void setActionEnqueue(Port port, int queueId) {
+ public void setActionEnqueue(PortNumber port, int queueId) {
actionEnqueue = new ActionEnqueue(port, queueId);
actionType = ActionValues.ACTION_ENQUEUE;
}
diff --git a/src/main/java/net/onrc/onos/core/util/FlowEntryMatch.java b/src/main/java/net/onrc/onos/core/util/FlowEntryMatch.java
index eabf401..d3f8d71 100644
--- a/src/main/java/net/onrc/onos/core/util/FlowEntryMatch.java
+++ b/src/main/java/net/onrc/onos/core/util/FlowEntryMatch.java
@@ -73,7 +73,7 @@
private boolean enabled; // Set to true, if matching is enabled
}
- private Field<Port> inPort; // Matching input switch port
+ private Field<PortNumber> inPort; // Matching input switch port
private Field<MACAddress> srcMac; // Matching source MAC address
private Field<MACAddress> dstMac; // Matching destination MAC address
private Field<Short> ethernetFrameType; // Matching Ethernet frame type
@@ -142,7 +142,7 @@
* @return the matching input switch port.
*/
@JsonProperty("inPort")
- public Port inPort() {
+ public PortNumber inPort() {
if (inPort != null) {
return inPort.value();
}
@@ -155,8 +155,8 @@
* @param newInPort the input switch port value to enable for matching.
*/
@JsonProperty("inPort")
- public void enableInPort(Port newInPort) {
- this.inPort = new Field<Port>(newInPort);
+ public void enableInPort(PortNumber newInPort) {
+ this.inPort = new Field<PortNumber>(newInPort);
}
/**
diff --git a/src/main/java/net/onrc/onos/core/util/Port.java b/src/main/java/net/onrc/onos/core/util/PortNumber.java
similarity index 73%
rename from src/main/java/net/onrc/onos/core/util/Port.java
rename to src/main/java/net/onrc/onos/core/util/PortNumber.java
index 20a2a21..f9f27bd 100644
--- a/src/main/java/net/onrc/onos/core/util/Port.java
+++ b/src/main/java/net/onrc/onos/core/util/PortNumber.java
@@ -3,10 +3,11 @@
import org.codehaus.jackson.annotate.JsonProperty;
/**
- * The class representing a network port of a switch.
- * This class is immutable.
+ * Immutable class representing a port number.
+ * <p/>
+ * Current implementation supports only OpenFlow 1.0 (16 bit unsigned) port number.
*/
-public final class Port {
+public final class PortNumber {
/**
* Special port values.
* <p/>
@@ -14,39 +15,39 @@
* (pp 18-19).
*/
public enum PortValues {
- /* Maximum number of physical switch ports. */
+ /** Maximum number of physical switch ports. */
PORT_MAX((short) 0xff00),
/* Fake output "ports". */
- /* Send the packet out the input port. This
+ /** Send the packet out the input port. This
virtual port must be explicitly used
in order to send back out of the input
port. */
PORT_IN_PORT((short) 0xfff8),
- /* Perform actions in flow table.
+ /** Perform actions in flow table.
NB: This can only be the destination
port for packet-out messages. */
PORT_TABLE((short) 0xfff9),
- /* Process with normal L2/L3 switching. */
+ /** Process with normal L2/L3 switching. */
PORT_NORMAL((short) 0xfffa),
- /* All physical ports except input port and
+ /** All physical ports except input port and
those disabled by STP. */
PORT_FLOOD((short) 0xfffb),
- /* All physical ports except input port. */
+ /** All physical ports except input port. */
PORT_ALL((short) 0xfffc),
- /* Send to controller. */
+ /** Send to controller. */
PORT_CONTROLLER((short) 0xfffd),
- /* Local openflow "port". */
+ /** Local openflow "port". */
PORT_LOCAL((short) 0xfffe),
- /* Not associated with a physical port. */
+ /** Not associated with a physical port. */
PORT_NONE((short) 0xffff);
private final short value; // The value
@@ -75,7 +76,7 @@
/**
* Default constructor.
*/
- public Port() {
+ protected PortNumber() {
this.value = 0;
}
@@ -84,7 +85,7 @@
*
* @param other the object to copy from.
*/
- public Port(Port other) {
+ public PortNumber(PortNumber other) {
this.value = other.value();
}
@@ -93,7 +94,7 @@
*
* @param value the value to use.
*/
- public Port(short value) {
+ public PortNumber(short value) {
this.value = value;
}
@@ -102,7 +103,7 @@
*
* @param value the value to use.
*/
- public Port(PortValues value) {
+ public PortNumber(PortValues value) {
this.value = value.value();
}
@@ -128,19 +129,17 @@
@Override
public boolean equals(Object other) {
- if (!(other instanceof Port)) {
+ if (!(other instanceof PortNumber)) {
return false;
}
- Port otherPort = (Port) other;
+ PortNumber otherPort = (PortNumber) other;
return value == otherPort.value;
}
@Override
public int hashCode() {
- int hash = 17;
- hash += 31 * hash + (int) value;
- return hash;
+ return value;
}
}
diff --git a/src/main/java/net/onrc/onos/core/util/SwitchPort.java b/src/main/java/net/onrc/onos/core/util/SwitchPort.java
index edb9f77..b3ed985 100644
--- a/src/main/java/net/onrc/onos/core/util/SwitchPort.java
+++ b/src/main/java/net/onrc/onos/core/util/SwitchPort.java
@@ -8,7 +8,7 @@
*/
public final class SwitchPort {
private final Dpid dpid; // The DPID of the switch
- private final Port port; // The port of the switch
+ private final PortNumber port; // The port of the switch
/**
* Default constructor.
@@ -24,7 +24,7 @@
* @param dpid the DPID to use.
* @param port the port to use.
*/
- public SwitchPort(Dpid dpid, Port port) {
+ public SwitchPort(Dpid dpid, PortNumber port) {
this.dpid = dpid;
this.port = port;
}
@@ -37,7 +37,7 @@
*/
public SwitchPort(long dpid, short port) {
this.dpid = new Dpid(dpid);
- this.port = new Port(port);
+ this.port = new PortNumber(port);
}
/**
@@ -56,7 +56,7 @@
* @return the port value of the Switch-Port.
*/
@JsonProperty("port")
- public Port port() {
+ public PortNumber port() {
return port;
}
diff --git a/src/main/java/net/onrc/onos/core/util/serializers/KryoFactory.java b/src/main/java/net/onrc/onos/core/util/serializers/KryoFactory.java
index 3b06ec3..aeb0c33 100644
--- a/src/main/java/net/onrc/onos/core/util/serializers/KryoFactory.java
+++ b/src/main/java/net/onrc/onos/core/util/serializers/KryoFactory.java
@@ -49,7 +49,7 @@
import net.onrc.onos.core.util.IPv4Net;
import net.onrc.onos.core.util.IPv6;
import net.onrc.onos.core.util.IPv6Net;
-import net.onrc.onos.core.util.Port;
+import net.onrc.onos.core.util.PortNumber;
import net.onrc.onos.core.util.Switch;
import com.esotericsoftware.kryo.Kryo;
@@ -182,7 +182,7 @@
kryo.register(IPv6Net.class);
kryo.register(byte[].class);
kryo.register(MACAddress.class);
- kryo.register(Port.class);
+ kryo.register(PortNumber.class);
kryo.register(Switch.class);
// kryo.register(SwitchPort.class);