Define APIs to determine how to translate an intent.
It's a part of ONOS-1654.
- IntentResolver handles translation of an intent
- IIntentRuntimeService supports to register/unregister IntentResolver
Change-Id: I9367fddf29eb55c3d7ed206e1fbf8635454f2e36
diff --git a/src/main/java/net/onrc/onos/api/intent/IIntentRuntimeService.java b/src/main/java/net/onrc/onos/api/intent/IIntentRuntimeService.java
index 2b8774b..6750595 100644
--- a/src/main/java/net/onrc/onos/api/intent/IIntentRuntimeService.java
+++ b/src/main/java/net/onrc/onos/api/intent/IIntentRuntimeService.java
@@ -67,6 +67,23 @@
boolean executeBatch(BatchOperation<Intent> ops);
/**
+ * Adds an IntentResolver associated with a given intent type.
+ *
+ * @param type the class instance of the intent type.
+ * @param resolver the resolver of the given intent type.
+ * @param <T> the type of the intent.
+ */
+ public <T extends Intent> void addResolver(Class<T> type, IntentResolver<T> resolver);
+
+ /**
+ * Removes the IntentResolver associated with the intent type.
+ *
+ * @param type the class instance of the intent type.
+ * @param <T> the type of the intent.
+ */
+ public <T extends Intent> void removeResolver(Class<T> type);
+
+ /**
* Gets IFlow objects managed by the specified intent.
*
* @param intentId ID of the target Intent.