* Added JsonSerialize to the Flow-related containers.
* Implement the remaining toString() methods that were
returning empty strings.
diff --git a/src/main/java/net/floodlightcontroller/util/FlowEntryId.java b/src/main/java/net/floodlightcontroller/util/FlowEntryId.java
index 4736ed5..bf1fc7d 100644
--- a/src/main/java/net/floodlightcontroller/util/FlowEntryId.java
+++ b/src/main/java/net/floodlightcontroller/util/FlowEntryId.java
@@ -1,8 +1,14 @@
package net.floodlightcontroller.util;
+import net.floodlightcontroller.util.serializers.FlowEntryIdSerializer;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
/**
* The class representing a Flow Entry ID.
*/
+@JsonSerialize(using=FlowEntryIdSerializer.class)
public class FlowEntryId {
private long value;
@@ -39,14 +45,12 @@
}
/**
- * Convert the Flow Entry ID value to a string.
+ * Convert the Flow Entry ID value to a hexadecimal string.
*
- * @return the Flow Entry ID value to a string.
+ * @return the Flow Entry ID value to a hexadecimal string.
*/
@Override
public String toString() {
- String ret = "";
- // TODO: Implement it!
- return ret;
+ return Long.toHexString(this.value);
}
}