Define ID representation for Intent, IFlow and MatchAction
- Defines BatchOperationTargetId abstract class.
- The above class is the base class of IntentId, FlowId, and MatchActionId.
-- Intent objects use IntentId class for its ID.
-- IFlow objects use FlowId class for its ID.
-- MatchAction objects use MatchActionId class for its ID.
- BatchOperation classes requires the BatchOperationTargetId as the target object's ID.
- This work is a part of ONOS-1758.
Change-Id: I71bb4e6acd3836d1ced3beb6fb331bca451abdc3
diff --git a/src/main/java/net/onrc/onos/api/flowmanager/SingleDstTreeFlow.java b/src/main/java/net/onrc/onos/api/flowmanager/SingleDstTreeFlow.java
index 82a9b50..473b7e8 100644
--- a/src/main/java/net/onrc/onos/api/flowmanager/SingleDstTreeFlow.java
+++ b/src/main/java/net/onrc/onos/api/flowmanager/SingleDstTreeFlow.java
@@ -18,7 +18,7 @@
* address modifications or other the label-switching-like schemes.
*/
public class SingleDstTreeFlow implements IFlow {
- protected String id;
+ protected final FlowId id;
protected PacketMatch match;
protected Set<SwitchPort> ingressPorts;
protected Tree tree;
@@ -35,7 +35,7 @@
*/
public SingleDstTreeFlow(String id, PacketMatch match,
Collection<SwitchPort> ingressPorts, Tree tree, OutputAction outputAction) {
- this.id = id;
+ this.id = new FlowId(id);
this.match = match;
this.ingressPorts = new HashSet<SwitchPort>(ingressPorts);
this.tree = tree;
@@ -46,7 +46,7 @@
}
@Override
- public String getId() {
+ public FlowId getId() {
return id;
}