Define the new Intent Framework APIs (Intent Service)
- Define the base Intent class and sub-classes required in SDN-IP
- IntentService provides the APIs for application developers
- IntentExtensionService enables to define application specific intent types
- Provide event handling mechanism via IntentEventListener
This is for ONOS-1654.
Change-Id: Id1705f1fbc1acd4862b33fd9ab97aafe2e84a685
diff --git a/src/main/java/net/onrc/onos/api/newintent/IntentCompiler.java b/src/main/java/net/onrc/onos/api/newintent/IntentCompiler.java
new file mode 100644
index 0000000..c778c11
--- /dev/null
+++ b/src/main/java/net/onrc/onos/api/newintent/IntentCompiler.java
@@ -0,0 +1,20 @@
+package net.onrc.onos.api.newintent;
+
+import java.util.List;
+
+/**
+ * Abstraction of a compiler which is capable of taking an intent
+ * and translating it to other, potentially installable, intents.
+ *
+ * @param <T> the type of intent
+ */
+public interface IntentCompiler<T extends Intent> {
+ /**
+ * Compiles the specified intent into other intents.
+ *
+ * @param intent intent to be compiled
+ * @return list of resulting intents
+ * @throws IntentException if issues are encountered while compiling the intent
+ */
+ List<Intent> compile(T intent);
+}