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/SingleSrcTreeFlow.java b/src/main/java/net/onrc/onos/api/flowmanager/SingleSrcTreeFlow.java
index cecb605..e401bdc 100644
--- a/src/main/java/net/onrc/onos/api/flowmanager/SingleSrcTreeFlow.java
+++ b/src/main/java/net/onrc/onos/api/flowmanager/SingleSrcTreeFlow.java
@@ -14,7 +14,7 @@
* layer.
*/
public class SingleSrcTreeFlow implements IFlow {
- protected String id;
+ protected final FlowId id;
protected PacketMatch match;
protected SwitchPort ingressPort;
protected Tree tree;
@@ -32,7 +32,7 @@
*/
public SingleSrcTreeFlow(String id, PacketMatch match,
SwitchPort ingressPort, Tree tree, Set<Pair<Dpid, OutputAction>> outputActions) {
- this.id = id;
+ this.id = new FlowId(id);
this.match = match;
this.ingressPort = ingressPort;
this.tree = tree;
@@ -43,7 +43,7 @@
}
@Override
- public String getId() {
+ public FlowId getId() {
return id;
}