Package org.onosproject.net.intent
Interface IntentExtensionService
-
@Beta public interface IntentExtensionService
Service for extending the capability of intent framework by adding additional compilers or/and installers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Map<java.lang.Class<? extends Intent>,IntentCompiler<? extends Intent>>
getCompilers()
Returns immutable set of bindings of currently registered intent compilers.<T extends Intent>
IntentInstaller<T>getInstaller(java.lang.Class<T> cls)
Returns the installer for specific installable intent.java.util.Map<java.lang.Class<? extends Intent>,IntentInstaller<? extends Intent>>
getInstallers()
Returns immutable set of binding of currently registered intent installers.<T extends Intent>
voidregisterCompiler(java.lang.Class<T> cls, IntentCompiler<T> compiler)
Registers the specified compiler for the given intent class.<T extends Intent>
voidregisterInstaller(java.lang.Class<T> cls, IntentInstaller<T> installer)
Registers the specific installer for the given intent class.<T extends Intent>
voidunregisterCompiler(java.lang.Class<T> cls)
Unregisters the compiler for the specified intent class.<T extends Intent>
voidunregisterInstaller(java.lang.Class<T> cls)
Unregisters the installer for the specific intent class.
-
-
-
Method Detail
-
registerCompiler
<T extends Intent> void registerCompiler(java.lang.Class<T> cls, IntentCompiler<T> compiler)
Registers the specified compiler for the given intent class.- Type Parameters:
T
- the type of intent- Parameters:
cls
- intent classcompiler
- intent compiler
-
unregisterCompiler
<T extends Intent> void unregisterCompiler(java.lang.Class<T> cls)
Unregisters the compiler for the specified intent class.- Type Parameters:
T
- the type of intent- Parameters:
cls
- intent class
-
getCompilers
java.util.Map<java.lang.Class<? extends Intent>,IntentCompiler<? extends Intent>> getCompilers()
Returns immutable set of bindings of currently registered intent compilers.- Returns:
- the set of compiler bindings
-
registerInstaller
<T extends Intent> void registerInstaller(java.lang.Class<T> cls, IntentInstaller<T> installer)
Registers the specific installer for the given intent class.- Type Parameters:
T
- the type of intent- Parameters:
cls
- intent classinstaller
- intent installer
-
unregisterInstaller
<T extends Intent> void unregisterInstaller(java.lang.Class<T> cls)
Unregisters the installer for the specific intent class.- Type Parameters:
T
- the type of intent- Parameters:
cls
- intent class
-
getInstallers
java.util.Map<java.lang.Class<? extends Intent>,IntentInstaller<? extends Intent>> getInstallers()
Returns immutable set of binding of currently registered intent installers.- Returns:
- the set of installer bindings
-
getInstaller
<T extends Intent> IntentInstaller<T> getInstaller(java.lang.Class<T> cls)
Returns the installer for specific installable intent.- Type Parameters:
T
- the type of intent- Parameters:
cls
- the type of intent- Returns:
- the installer for specific installable intent
-
-