* 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/FlowPath.java b/src/main/java/net/floodlightcontroller/util/FlowPath.java
index 46a1f82..b67fabe 100644
--- a/src/main/java/net/floodlightcontroller/util/FlowPath.java
+++ b/src/main/java/net/floodlightcontroller/util/FlowPath.java
@@ -3,10 +3,15 @@
import net.floodlightcontroller.util.CallerId;
import net.floodlightcontroller.util.DataPath;
import net.floodlightcontroller.util.FlowId;
+import net.floodlightcontroller.util.serializers.FlowPathSerializer;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
/**
* The class representing the Flow Path.
*/
+@JsonSerialize(using=FlowPathSerializer.class)
public class FlowPath {
private FlowId flowId; // The Flow ID
private CallerId installerId; // The Caller ID of the path installer
@@ -73,8 +78,9 @@
*/
@Override
public String toString() {
- String ret = "";
- // TODO: Implement it!
+ String ret = "[flowId:" + this.flowId.toString();
+ ret += " installerId:" + this.installerId.toString();
+ ret += " dataPath:" + this.dataPath.toString();
return ret;
}
}