blob: c6338a7f9af6f0257b87a63a1e09c9f4103950bf [file] [log] [blame]
Brian O'Connorb876bf12014-10-02 14:59:37 -07001package org.onlab.onos.net.intent;
2
3import java.util.Map;
4
5/**
6 * Service for extending the capability of intent framework by
7 * adding additional compilers or/and installers.
8 */
9public interface IntentExtensionService {
10 /**
11 * Registers the specified compiler for the given intent class.
12 *
13 * @param cls intent class
14 * @param compiler intent compiler
15 * @param <T> the type of intent
16 */
17 <T extends Intent> void registerCompiler(Class<T> cls, IntentCompiler<T> compiler);
18
19 /**
20 * Unregisters the compiler for the specified intent class.
21 *
22 * @param cls intent class
23 * @param <T> the type of intent
24 */
25 <T extends Intent> void unregisterCompiler(Class<T> cls);
26
27 /**
28 * Returns immutable set of bindings of currently registered intent compilers.
29 *
30 * @return the set of compiler bindings
31 */
32 Map<Class<? extends Intent>, IntentCompiler<? extends Intent>> getCompilers();
33
34 /**
35 * Registers the specified installer for the given installable intent class.
36 *
37 * @param cls installable intent class
38 * @param installer intent installer
39 * @param <T> the type of installable intent
40 */
41 <T extends InstallableIntent> void registerInstaller(Class<T> cls, IntentInstaller<T> installer);
42
43 /**
44 * Unregisters the installer for the given installable intent class.
45 *
46 * @param cls installable intent class
47 * @param <T> the type of installable intent
48 */
49 <T extends InstallableIntent> void unregisterInstaller(Class<T> cls);
50
51 /**
52 * Returns immutable set of bindings of currently registered intent installers.
53 *
54 * @return the set of installer bindings
55 */
56 Map<Class<? extends InstallableIntent>, IntentInstaller<? extends InstallableIntent>> getInstallers();
57}