Fix checkstyle whitespace issues - WHITESPACE ONLY
Change-Id: Ic205c1afd639c6008d61d9de95cb764eeb6238ca
diff --git a/src/main/java/net/onrc/onos/core/util/serializers/DpidDeserializer.java b/src/main/java/net/onrc/onos/core/util/serializers/DpidDeserializer.java
index 7a8c570..955f0ff 100644
--- a/src/main/java/net/onrc/onos/core/util/serializers/DpidDeserializer.java
+++ b/src/main/java/net/onrc/onos/core/util/serializers/DpidDeserializer.java
@@ -21,20 +21,20 @@
@Override
public Dpid deserialize(JsonParser jp,
- DeserializationContext ctxt)
- throws IOException, JsonProcessingException {
+ DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
- Dpid dpid = null;
+ Dpid dpid = null;
- jp.nextToken(); // Move to JsonToken.START_OBJECT
- while (jp.nextToken() != JsonToken.END_OBJECT) {
- String fieldname = jp.getCurrentName();
- if ("value".equals(fieldname)) {
- String value = jp.getText();
- log.debug("Fieldname: {} Value: {}", fieldname, value);
- dpid = new Dpid(value);
- }
- }
- return dpid;
+ jp.nextToken(); // Move to JsonToken.START_OBJECT
+ while (jp.nextToken() != JsonToken.END_OBJECT) {
+ String fieldname = jp.getCurrentName();
+ if ("value".equals(fieldname)) {
+ String value = jp.getText();
+ log.debug("Fieldname: {} Value: {}", fieldname, value);
+ dpid = new Dpid(value);
+ }
+ }
+ return dpid;
}
}
diff --git a/src/main/java/net/onrc/onos/core/util/serializers/DpidSerializer.java b/src/main/java/net/onrc/onos/core/util/serializers/DpidSerializer.java
index 4e784f2..68766f9 100644
--- a/src/main/java/net/onrc/onos/core/util/serializers/DpidSerializer.java
+++ b/src/main/java/net/onrc/onos/core/util/serializers/DpidSerializer.java
@@ -16,10 +16,10 @@
@Override
public void serialize(Dpid dpid, JsonGenerator jGen,
- SerializerProvider serializer)
- throws IOException, JsonProcessingException {
- jGen.writeStartObject();
- jGen.writeStringField("value", dpid.toString());
- jGen.writeEndObject();
+ SerializerProvider serializer)
+ throws IOException, JsonProcessingException {
+ jGen.writeStartObject();
+ jGen.writeStringField("value", dpid.toString());
+ jGen.writeEndObject();
}
}
diff --git a/src/main/java/net/onrc/onos/core/util/serializers/FlowEntryIdDeserializer.java b/src/main/java/net/onrc/onos/core/util/serializers/FlowEntryIdDeserializer.java
index 712daa8..de13574 100644
--- a/src/main/java/net/onrc/onos/core/util/serializers/FlowEntryIdDeserializer.java
+++ b/src/main/java/net/onrc/onos/core/util/serializers/FlowEntryIdDeserializer.java
@@ -21,20 +21,20 @@
@Override
public FlowEntryId deserialize(JsonParser jp,
- DeserializationContext ctxt)
- throws IOException, JsonProcessingException {
+ DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
- FlowEntryId flowEntryId = null;
+ FlowEntryId flowEntryId = null;
- jp.nextToken(); // Move to JsonToken.START_OBJECT
- while (jp.nextToken() != JsonToken.END_OBJECT) {
- String fieldname = jp.getCurrentName();
- if ("value".equals(fieldname)) {
- String value = jp.getText();
- log.debug("Fieldname: " + fieldname + " Value: " + value);
- flowEntryId = new FlowEntryId(value);
- }
- }
- return flowEntryId;
+ jp.nextToken(); // Move to JsonToken.START_OBJECT
+ while (jp.nextToken() != JsonToken.END_OBJECT) {
+ String fieldname = jp.getCurrentName();
+ if ("value".equals(fieldname)) {
+ String value = jp.getText();
+ log.debug("Fieldname: " + fieldname + " Value: " + value);
+ flowEntryId = new FlowEntryId(value);
+ }
+ }
+ return flowEntryId;
}
}
diff --git a/src/main/java/net/onrc/onos/core/util/serializers/FlowEntryIdSerializer.java b/src/main/java/net/onrc/onos/core/util/serializers/FlowEntryIdSerializer.java
index 3911a4c..bc91f46 100644
--- a/src/main/java/net/onrc/onos/core/util/serializers/FlowEntryIdSerializer.java
+++ b/src/main/java/net/onrc/onos/core/util/serializers/FlowEntryIdSerializer.java
@@ -16,8 +16,8 @@
@Override
public void serialize(FlowEntryId flowEntryId, JsonGenerator jGen,
- SerializerProvider serializer)
- throws IOException, JsonProcessingException {
- jGen.writeString(flowEntryId.toString());
+ SerializerProvider serializer)
+ throws IOException, JsonProcessingException {
+ jGen.writeString(flowEntryId.toString());
}
}
diff --git a/src/main/java/net/onrc/onos/core/util/serializers/FlowIdDeserializer.java b/src/main/java/net/onrc/onos/core/util/serializers/FlowIdDeserializer.java
index d1b91a8..12c5cbd 100644
--- a/src/main/java/net/onrc/onos/core/util/serializers/FlowIdDeserializer.java
+++ b/src/main/java/net/onrc/onos/core/util/serializers/FlowIdDeserializer.java
@@ -21,20 +21,20 @@
@Override
public FlowId deserialize(JsonParser jp,
- DeserializationContext ctxt)
- throws IOException, JsonProcessingException {
+ DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
- FlowId flowId = null;
+ FlowId flowId = null;
- jp.nextToken(); // Move to JsonToken.START_OBJECT
- while (jp.nextToken() != JsonToken.END_OBJECT) {
- String fieldname = jp.getCurrentName();
- if ("value".equals(fieldname)) {
- String value = jp.getText();
- log.debug("Fieldname: {} Value: {}", fieldname, value);
- flowId = new FlowId(value);
- }
- }
- return flowId;
+ jp.nextToken(); // Move to JsonToken.START_OBJECT
+ while (jp.nextToken() != JsonToken.END_OBJECT) {
+ String fieldname = jp.getCurrentName();
+ if ("value".equals(fieldname)) {
+ String value = jp.getText();
+ log.debug("Fieldname: {} Value: {}", fieldname, value);
+ flowId = new FlowId(value);
+ }
+ }
+ return flowId;
}
}
diff --git a/src/main/java/net/onrc/onos/core/util/serializers/FlowIdSerializer.java b/src/main/java/net/onrc/onos/core/util/serializers/FlowIdSerializer.java
index b0d020e..37a3e45 100644
--- a/src/main/java/net/onrc/onos/core/util/serializers/FlowIdSerializer.java
+++ b/src/main/java/net/onrc/onos/core/util/serializers/FlowIdSerializer.java
@@ -16,10 +16,10 @@
@Override
public void serialize(FlowId flowId, JsonGenerator jGen,
- SerializerProvider serializer)
- throws IOException, JsonProcessingException {
- jGen.writeStartObject();
- jGen.writeStringField("value", flowId.toString());
- jGen.writeEndObject();
+ SerializerProvider serializer)
+ throws IOException, JsonProcessingException {
+ jGen.writeStartObject();
+ jGen.writeStringField("value", flowId.toString());
+ jGen.writeEndObject();
}
}
diff --git a/src/main/java/net/onrc/onos/core/util/serializers/IPv4Deserializer.java b/src/main/java/net/onrc/onos/core/util/serializers/IPv4Deserializer.java
index 2992bfd..f58f746 100644
--- a/src/main/java/net/onrc/onos/core/util/serializers/IPv4Deserializer.java
+++ b/src/main/java/net/onrc/onos/core/util/serializers/IPv4Deserializer.java
@@ -21,20 +21,20 @@
@Override
public IPv4 deserialize(JsonParser jp,
- DeserializationContext ctxt)
- throws IOException, JsonProcessingException {
+ DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
- IPv4 ipv4 = null;
+ IPv4 ipv4 = null;
- jp.nextToken(); // Move to JsonToken.START_OBJECT
- while (jp.nextToken() != JsonToken.END_OBJECT) {
- String fieldname = jp.getCurrentName();
- if ("value".equals(fieldname)) {
- String value = jp.getText();
- log.debug("Fieldname: {} Value: {}", fieldname, value);
- ipv4 = new IPv4(value);
- }
- }
- return ipv4;
+ jp.nextToken(); // Move to JsonToken.START_OBJECT
+ while (jp.nextToken() != JsonToken.END_OBJECT) {
+ String fieldname = jp.getCurrentName();
+ if ("value".equals(fieldname)) {
+ String value = jp.getText();
+ log.debug("Fieldname: {} Value: {}", fieldname, value);
+ ipv4 = new IPv4(value);
+ }
+ }
+ return ipv4;
}
}
diff --git a/src/main/java/net/onrc/onos/core/util/serializers/IPv4NetDeserializer.java b/src/main/java/net/onrc/onos/core/util/serializers/IPv4NetDeserializer.java
index 68f74c4..da68668 100644
--- a/src/main/java/net/onrc/onos/core/util/serializers/IPv4NetDeserializer.java
+++ b/src/main/java/net/onrc/onos/core/util/serializers/IPv4NetDeserializer.java
@@ -21,20 +21,20 @@
@Override
public IPv4Net deserialize(JsonParser jp,
- DeserializationContext ctxt)
- throws IOException, JsonProcessingException {
+ DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
- IPv4Net ipv4Net = null;
+ IPv4Net ipv4Net = null;
- jp.nextToken(); // Move to JsonToken.START_OBJECT
- while (jp.nextToken() != JsonToken.END_OBJECT) {
- String fieldname = jp.getCurrentName();
- if ("value".equals(fieldname)) {
- String value = jp.getText();
- log.debug("Fieldname: {} Value: {}", fieldname, value);
- ipv4Net = new IPv4Net(value);
- }
- }
- return ipv4Net;
+ jp.nextToken(); // Move to JsonToken.START_OBJECT
+ while (jp.nextToken() != JsonToken.END_OBJECT) {
+ String fieldname = jp.getCurrentName();
+ if ("value".equals(fieldname)) {
+ String value = jp.getText();
+ log.debug("Fieldname: {} Value: {}", fieldname, value);
+ ipv4Net = new IPv4Net(value);
+ }
+ }
+ return ipv4Net;
}
}
diff --git a/src/main/java/net/onrc/onos/core/util/serializers/IPv4NetSerializer.java b/src/main/java/net/onrc/onos/core/util/serializers/IPv4NetSerializer.java
index 697f846..f44aeb3 100644
--- a/src/main/java/net/onrc/onos/core/util/serializers/IPv4NetSerializer.java
+++ b/src/main/java/net/onrc/onos/core/util/serializers/IPv4NetSerializer.java
@@ -16,10 +16,10 @@
@Override
public void serialize(IPv4Net ipv4Net, JsonGenerator jGen,
- SerializerProvider serializer)
- throws IOException, JsonProcessingException {
- jGen.writeStartObject();
- jGen.writeStringField("value", ipv4Net.toString());
- jGen.writeEndObject();
+ SerializerProvider serializer)
+ throws IOException, JsonProcessingException {
+ jGen.writeStartObject();
+ jGen.writeStringField("value", ipv4Net.toString());
+ jGen.writeEndObject();
}
}
diff --git a/src/main/java/net/onrc/onos/core/util/serializers/IPv4Serializer.java b/src/main/java/net/onrc/onos/core/util/serializers/IPv4Serializer.java
index 773fd1d..37a5564 100644
--- a/src/main/java/net/onrc/onos/core/util/serializers/IPv4Serializer.java
+++ b/src/main/java/net/onrc/onos/core/util/serializers/IPv4Serializer.java
@@ -16,10 +16,10 @@
@Override
public void serialize(IPv4 ipv4, JsonGenerator jGen,
- SerializerProvider serializer)
- throws IOException, JsonProcessingException {
- jGen.writeStartObject();
- jGen.writeStringField("value", ipv4.toString());
- jGen.writeEndObject();
+ SerializerProvider serializer)
+ throws IOException, JsonProcessingException {
+ jGen.writeStartObject();
+ jGen.writeStringField("value", ipv4.toString());
+ jGen.writeEndObject();
}
}
diff --git a/src/main/java/net/onrc/onos/core/util/serializers/IPv6Deserializer.java b/src/main/java/net/onrc/onos/core/util/serializers/IPv6Deserializer.java
index 6627d2a..3b9673a 100644
--- a/src/main/java/net/onrc/onos/core/util/serializers/IPv6Deserializer.java
+++ b/src/main/java/net/onrc/onos/core/util/serializers/IPv6Deserializer.java
@@ -21,20 +21,20 @@
@Override
public IPv6 deserialize(JsonParser jp,
- DeserializationContext ctxt)
- throws IOException, JsonProcessingException {
+ DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
- IPv6 ipv6 = null;
+ IPv6 ipv6 = null;
- jp.nextToken(); // Move to JsonToken.START_OBJECT
- while (jp.nextToken() != JsonToken.END_OBJECT) {
- String fieldname = jp.getCurrentName();
- if ("value".equals(fieldname)) {
- String value = jp.getText();
- log.debug("Fieldname: {} Value: {}", fieldname, value);
- ipv6 = new IPv6(value);
- }
- }
- return ipv6;
+ jp.nextToken(); // Move to JsonToken.START_OBJECT
+ while (jp.nextToken() != JsonToken.END_OBJECT) {
+ String fieldname = jp.getCurrentName();
+ if ("value".equals(fieldname)) {
+ String value = jp.getText();
+ log.debug("Fieldname: {} Value: {}", fieldname, value);
+ ipv6 = new IPv6(value);
+ }
+ }
+ return ipv6;
}
}
diff --git a/src/main/java/net/onrc/onos/core/util/serializers/IPv6NetDeserializer.java b/src/main/java/net/onrc/onos/core/util/serializers/IPv6NetDeserializer.java
index 08b8018..2b80984 100644
--- a/src/main/java/net/onrc/onos/core/util/serializers/IPv6NetDeserializer.java
+++ b/src/main/java/net/onrc/onos/core/util/serializers/IPv6NetDeserializer.java
@@ -21,20 +21,20 @@
@Override
public IPv6Net deserialize(JsonParser jp,
- DeserializationContext ctxt)
- throws IOException, JsonProcessingException {
+ DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
- IPv6Net ipv6Net = null;
+ IPv6Net ipv6Net = null;
- jp.nextToken(); // Move to JsonToken.START_OBJECT
- while (jp.nextToken() != JsonToken.END_OBJECT) {
- String fieldname = jp.getCurrentName();
- if ("value".equals(fieldname)) {
- String value = jp.getText();
- log.debug("Fieldname: {} Value: {}", fieldname, value);
- ipv6Net = new IPv6Net(value);
- }
- }
- return ipv6Net;
+ jp.nextToken(); // Move to JsonToken.START_OBJECT
+ while (jp.nextToken() != JsonToken.END_OBJECT) {
+ String fieldname = jp.getCurrentName();
+ if ("value".equals(fieldname)) {
+ String value = jp.getText();
+ log.debug("Fieldname: {} Value: {}", fieldname, value);
+ ipv6Net = new IPv6Net(value);
+ }
+ }
+ return ipv6Net;
}
}
diff --git a/src/main/java/net/onrc/onos/core/util/serializers/IPv6NetSerializer.java b/src/main/java/net/onrc/onos/core/util/serializers/IPv6NetSerializer.java
index 99bd654..690b17f 100644
--- a/src/main/java/net/onrc/onos/core/util/serializers/IPv6NetSerializer.java
+++ b/src/main/java/net/onrc/onos/core/util/serializers/IPv6NetSerializer.java
@@ -16,10 +16,10 @@
@Override
public void serialize(IPv6Net ipv6Net, JsonGenerator jGen,
- SerializerProvider serializer)
- throws IOException, JsonProcessingException {
- jGen.writeStartObject();
- jGen.writeStringField("value", ipv6Net.toString());
- jGen.writeEndObject();
+ SerializerProvider serializer)
+ throws IOException, JsonProcessingException {
+ jGen.writeStartObject();
+ jGen.writeStringField("value", ipv6Net.toString());
+ jGen.writeEndObject();
}
}
diff --git a/src/main/java/net/onrc/onos/core/util/serializers/IPv6Serializer.java b/src/main/java/net/onrc/onos/core/util/serializers/IPv6Serializer.java
index b165658..ed39fee 100644
--- a/src/main/java/net/onrc/onos/core/util/serializers/IPv6Serializer.java
+++ b/src/main/java/net/onrc/onos/core/util/serializers/IPv6Serializer.java
@@ -16,10 +16,10 @@
@Override
public void serialize(IPv6 ipv6, JsonGenerator jGen,
- SerializerProvider serializer)
- throws IOException, JsonProcessingException {
- jGen.writeStartObject();
- jGen.writeStringField("value", ipv6.toString());
- jGen.writeEndObject();
+ SerializerProvider serializer)
+ throws IOException, JsonProcessingException {
+ jGen.writeStartObject();
+ jGen.writeStringField("value", ipv6.toString());
+ jGen.writeEndObject();
}
}
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 3590f67..e78be58 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
@@ -62,7 +62,7 @@
/**
* Default constructor.
- *
+ * <p/>
* Preallocates {@code DEFAULT_PREALLOCATIONS} Kryo instances.
*/
public KryoFactory() {
@@ -89,7 +89,7 @@
* @return the created Kryo object.
*/
public Kryo newKryo() {
- return newDeleteKryo(null);
+ return newDeleteKryo(null);
}
/**
@@ -98,34 +98,34 @@
* @param deleteKryo the object to delete.
*/
public void deleteKryo(Kryo deleteKryo) {
- newDeleteKryo(deleteKryo);
+ newDeleteKryo(deleteKryo);
}
/**
* Create or delete a Kryo object.
*
* @param deleteKryo if null, then allocate and return a new object,
- * otherwise delete the provided object.
+ * otherwise delete the provided object.
* @return a new Kryo object if needed, otherwise null.
*/
synchronized private Kryo newDeleteKryo(Kryo deleteKryo) {
- if (deleteKryo != null) {
- // Delete an entry by moving it back to the buffer
- kryoList.add(deleteKryo);
- return null;
- } else {
- Kryo kryo = null;
- if (kryoList.isEmpty()) {
- // Preallocate
- for (int i = 0; i < 100; i++) {
- kryo = newKryoImpl();
- kryoList.add(kryo);
- }
- }
+ if (deleteKryo != null) {
+ // Delete an entry by moving it back to the buffer
+ kryoList.add(deleteKryo);
+ return null;
+ } else {
+ Kryo kryo = null;
+ if (kryoList.isEmpty()) {
+ // Preallocate
+ for (int i = 0; i < 100; i++) {
+ kryo = newKryoImpl();
+ kryoList.add(kryo);
+ }
+ }
- kryo = kryoList.remove(kryoList.size() - 1);
- return kryo;
- }
+ kryo = kryoList.remove(kryoList.size() - 1);
+ return kryo;
+ }
}
/**
@@ -134,91 +134,91 @@
* @return the created Kryo object.
*/
private Kryo newKryoImpl() {
- Kryo kryo = new Kryo();
- kryo.setRegistrationRequired(true);
- //
- // WARNING: Order of register() calls affects serialized bytes.
- // - Do no insert new entry in the middle, always add to the end.
- // - Do not simply remove existing entry
- //
+ Kryo kryo = new Kryo();
+ kryo.setRegistrationRequired(true);
+ //
+ // WARNING: Order of register() calls affects serialized bytes.
+ // - Do no insert new entry in the middle, always add to the end.
+ // - Do not simply remove existing entry
+ //
- // kryo.setReferences(false);
- //
- kryo.register(ArrayList.class);
+ // kryo.setReferences(false);
+ //
+ kryo.register(ArrayList.class);
- // FlowPath and related classes
- kryo.register(CallerId.class);
- kryo.register(DataPath.class);
- kryo.register(DataPathEndpoints.class);
- kryo.register(Dpid.class);
- kryo.register(FlowEntryAction.class);
- kryo.register(FlowEntryAction.ActionEnqueue.class);
- kryo.register(FlowEntryAction.ActionOutput.class);
- kryo.register(FlowEntryAction.ActionSetEthernetAddr.class);
- kryo.register(FlowEntryAction.ActionSetIpToS.class);
- kryo.register(FlowEntryAction.ActionSetIPv4Addr.class);
- kryo.register(FlowEntryAction.ActionSetTcpUdpPort.class);
- kryo.register(FlowEntryAction.ActionSetVlanId.class);
- kryo.register(FlowEntryAction.ActionSetVlanPriority.class);
- kryo.register(FlowEntryAction.ActionStripVlan.class);
- kryo.register(FlowEntryAction.ActionValues.class);
- kryo.register(FlowEntryActions.class);
- kryo.register(FlowEntryErrorState.class);
- kryo.register(FlowEntryId.class);
- kryo.register(FlowEntry.class);
- kryo.register(FlowEntryMatch.class);
- kryo.register(FlowEntryMatch.Field.class);
- kryo.register(FlowEntrySwitchState.class);
- kryo.register(FlowEntryUserState.class);
- kryo.register(FlowId.class);
- kryo.register(FlowPath.class);
- kryo.register(FlowPathFlags.class);
- kryo.register(FlowPathType.class);
- kryo.register(FlowPathUserState.class);
- kryo.register(IPv4.class);
- kryo.register(IPv4Net.class);
- kryo.register(IPv6.class);
- kryo.register(IPv6Net.class);
- kryo.register(byte[].class);
- kryo.register(MACAddress.class);
- kryo.register(Port.class);
- kryo.register(Switch.class);
- // kryo.register(SwitchPort.class);
+ // FlowPath and related classes
+ kryo.register(CallerId.class);
+ kryo.register(DataPath.class);
+ kryo.register(DataPathEndpoints.class);
+ kryo.register(Dpid.class);
+ kryo.register(FlowEntryAction.class);
+ kryo.register(FlowEntryAction.ActionEnqueue.class);
+ kryo.register(FlowEntryAction.ActionOutput.class);
+ kryo.register(FlowEntryAction.ActionSetEthernetAddr.class);
+ kryo.register(FlowEntryAction.ActionSetIpToS.class);
+ kryo.register(FlowEntryAction.ActionSetIPv4Addr.class);
+ kryo.register(FlowEntryAction.ActionSetTcpUdpPort.class);
+ kryo.register(FlowEntryAction.ActionSetVlanId.class);
+ kryo.register(FlowEntryAction.ActionSetVlanPriority.class);
+ kryo.register(FlowEntryAction.ActionStripVlan.class);
+ kryo.register(FlowEntryAction.ActionValues.class);
+ kryo.register(FlowEntryActions.class);
+ kryo.register(FlowEntryErrorState.class);
+ kryo.register(FlowEntryId.class);
+ kryo.register(FlowEntry.class);
+ kryo.register(FlowEntryMatch.class);
+ kryo.register(FlowEntryMatch.Field.class);
+ kryo.register(FlowEntrySwitchState.class);
+ kryo.register(FlowEntryUserState.class);
+ kryo.register(FlowId.class);
+ kryo.register(FlowPath.class);
+ kryo.register(FlowPathFlags.class);
+ kryo.register(FlowPathType.class);
+ kryo.register(FlowPathUserState.class);
+ kryo.register(IPv4.class);
+ kryo.register(IPv4Net.class);
+ kryo.register(IPv6.class);
+ kryo.register(IPv6Net.class);
+ kryo.register(byte[].class);
+ kryo.register(MACAddress.class);
+ kryo.register(Port.class);
+ kryo.register(Switch.class);
+ // kryo.register(SwitchPort.class);
- // New data model-related classes
- kryo.register(DeviceEvent.class);
- kryo.register(InetAddress.class);
- kryo.register(LinkEvent.class);
- kryo.register(PortEvent.class);
- kryo.register(PortEvent.SwitchPort.class);
- kryo.register(SwitchEvent.class);
- kryo.register(TopologyEvent.class);
+ // New data model-related classes
+ kryo.register(DeviceEvent.class);
+ kryo.register(InetAddress.class);
+ kryo.register(LinkEvent.class);
+ kryo.register(PortEvent.class);
+ kryo.register(PortEvent.SwitchPort.class);
+ kryo.register(SwitchEvent.class);
+ kryo.register(TopologyEvent.class);
- // Intent-related classes
- kryo.register(Path.class);
- kryo.register(Intent.class);
- kryo.register(Intent.IntentState.class);
- kryo.register(PathIntent.class);
- kryo.register(ShortestPathIntent.class);
- kryo.register(ConstrainedShortestPathIntent.class);
- kryo.register(ErrorIntent.class);
- kryo.register(ErrorIntent.ErrorType.class);
- kryo.register(IntentOperation.class);
- kryo.register(IntentOperation.Operator.class);
- kryo.register(IntentOperationList.class);
- kryo.register(IntentStateList.class);
+ // Intent-related classes
+ kryo.register(Path.class);
+ kryo.register(Intent.class);
+ kryo.register(Intent.IntentState.class);
+ kryo.register(PathIntent.class);
+ kryo.register(ShortestPathIntent.class);
+ kryo.register(ConstrainedShortestPathIntent.class);
+ kryo.register(ErrorIntent.class);
+ kryo.register(ErrorIntent.ErrorType.class);
+ kryo.register(IntentOperation.class);
+ kryo.register(IntentOperation.Operator.class);
+ kryo.register(IntentOperationList.class);
+ kryo.register(IntentStateList.class);
- // Device-related classes
- kryo.register(HashSet.class);
- kryo.register(Inet4Address.class);
- kryo.register(OnosDevice.class);
- kryo.register(Date.class);
+ // Device-related classes
+ kryo.register(HashSet.class);
+ kryo.register(Inet4Address.class);
+ kryo.register(OnosDevice.class);
+ kryo.register(Date.class);
- // ProxyArp-related classes
- kryo.register(BroadcastPacketOutNotification.class);
- kryo.register(SinglePacketOutNotification.class);
- kryo.register(ArpReplyNotification.class);
+ // ProxyArp-related classes
+ kryo.register(BroadcastPacketOutNotification.class);
+ kryo.register(SinglePacketOutNotification.class);
+ kryo.register(ArpReplyNotification.class);
- return kryo;
+ return kryo;
}
}
diff --git a/src/main/java/net/onrc/onos/core/util/serializers/MACAddressDeserializer.java b/src/main/java/net/onrc/onos/core/util/serializers/MACAddressDeserializer.java
index 4ed31a5..45bc336 100644
--- a/src/main/java/net/onrc/onos/core/util/serializers/MACAddressDeserializer.java
+++ b/src/main/java/net/onrc/onos/core/util/serializers/MACAddressDeserializer.java
@@ -21,20 +21,20 @@
@Override
public MACAddress deserialize(JsonParser jp,
- DeserializationContext ctxt)
- throws IOException, JsonProcessingException {
+ DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
- MACAddress mac = null;
+ MACAddress mac = null;
- jp.nextToken(); // Move to JsonToken.START_OBJECT
- while (jp.nextToken() != JsonToken.END_OBJECT) {
- String fieldname = jp.getCurrentName();
- if ("value".equals(fieldname)) {
- String value = jp.getText();
- log.debug("Fieldname: {} Value: {}", fieldname, value);
- mac = MACAddress.valueOf(value);
- }
- }
- return mac;
+ jp.nextToken(); // Move to JsonToken.START_OBJECT
+ while (jp.nextToken() != JsonToken.END_OBJECT) {
+ String fieldname = jp.getCurrentName();
+ if ("value".equals(fieldname)) {
+ String value = jp.getText();
+ log.debug("Fieldname: {} Value: {}", fieldname, value);
+ mac = MACAddress.valueOf(value);
+ }
+ }
+ return mac;
}
}
diff --git a/src/main/java/net/onrc/onos/core/util/serializers/MACAddressSerializer.java b/src/main/java/net/onrc/onos/core/util/serializers/MACAddressSerializer.java
index e57a777..f56ac0a 100644
--- a/src/main/java/net/onrc/onos/core/util/serializers/MACAddressSerializer.java
+++ b/src/main/java/net/onrc/onos/core/util/serializers/MACAddressSerializer.java
@@ -16,10 +16,10 @@
@Override
public void serialize(MACAddress mac, JsonGenerator jGen,
- SerializerProvider serializer)
- throws IOException, JsonProcessingException {
- jGen.writeStartObject();
- jGen.writeStringField("value", mac.toString());
- jGen.writeEndObject();
+ SerializerProvider serializer)
+ throws IOException, JsonProcessingException {
+ jGen.writeStartObject();
+ jGen.writeStringField("value", mac.toString());
+ jGen.writeEndObject();
}
}