Implement IntentInstallers
IntentInstallers for:
- PathFlowIntent
- SingleDstTreeFlowIntent
- SingleSrcTreeFlowIntent
This resolves ONOS-1884, ONOS-1885, and ONOS-1886.
Change-Id: Ie0eac4bab9a2898b582edf2e4291498f0a583d71
diff --git a/src/main/java/net/onrc/onos/core/newintent/SingleSrcTreeFlowIntentInstaller.java b/src/main/java/net/onrc/onos/core/newintent/SingleSrcTreeFlowIntentInstaller.java
new file mode 100644
index 0000000..38aec87
--- /dev/null
+++ b/src/main/java/net/onrc/onos/core/newintent/SingleSrcTreeFlowIntentInstaller.java
@@ -0,0 +1,31 @@
+package net.onrc.onos.core.newintent;
+
+import net.onrc.onos.api.flowmanager.FlowManagerService;
+
+/**
+ * An intent installer for {@link SingleSrcTreeFlowIntent}.
+ */
+public class SingleSrcTreeFlowIntentInstaller
+ extends AbstractIntentInstaller<SingleSrcTreeFlowIntent> {
+
+ /**
+ * Constructs an intent installer for {@link SingleSrcTreeFlowIntent}
+ * with the specified Flow Manager service, which is used in this class.
+ *
+ * @param flowManager Flow Manager service, which is used
+ * to install/remove an intent
+ */
+ public SingleSrcTreeFlowIntentInstaller(FlowManagerService flowManager) {
+ super(flowManager);
+ }
+
+ @Override
+ public void install(SingleSrcTreeFlowIntent intent) {
+ installFlow(intent, intent.getTree());
+ }
+
+ @Override
+ public void remove(SingleSrcTreeFlowIntent intent) {
+ removeFlow(intent, intent.getTree());
+ }
+}