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 Map<Class<? extends Intent>,IntentCompiler<? extends Intent>>
getCompilers()
Returns immutable set of bindings of currently registered intent compilers.<T extends Intent>
IntentInstaller<T>getInstaller(Class<T> cls)
Returns the installer for specific installable intent.Map<Class<? extends Intent>,IntentInstaller<? extends Intent>>
getInstallers()
Returns immutable set of binding of currently registered intent installers.<T extends Intent>
voidregisterCompiler(Class<T> cls, IntentCompiler<T> compiler)
Registers the specified compiler for the given intent class.<T extends Intent>
voidregisterInstaller(Class<T> cls, IntentInstaller<T> installer)
Registers the specific installer for the given intent class.<T extends Intent>
voidunregisterCompiler(Class<T> cls)
Unregisters the compiler for the specified intent class.<T extends Intent>
voidunregisterInstaller(Class<T> cls)
Unregisters the installer for the specific intent class.
-
-
-
Method Detail
-
registerCompiler
<T extends Intent> void registerCompiler(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(Class<T> cls)
Unregisters the compiler for the specified intent class.- Type Parameters:
T
- the type of intent- Parameters:
cls
- intent class
-
getCompilers
Map<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(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(Class<T> cls)
Unregisters the installer for the specific intent class.- Type Parameters:
T
- the type of intent- Parameters:
cls
- intent class
-
getInstallers
Map<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(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
-
-