blob: 786b60eeb3663a1dbf8e97b702ff60a476365c5d [file] [log] [blame]
Thomas Vachuska83e090e2014-10-22 14:25:35 -07001/*
Ray Milkey34c95902015-04-15 09:47:53 -07002 * Copyright 2014-2015 Open Networking Laboratory
Thomas Vachuska83e090e2014-10-22 14:25:35 -07003 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07004 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
Thomas Vachuska83e090e2014-10-22 14:25:35 -07007 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07008 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
Thomas Vachuska83e090e2014-10-22 14:25:35 -070015 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.net.intent;
Brian O'Connorb876bf12014-10-02 14:59:37 -070017
18import java.util.Map;
19
20/**
21 * Service for extending the capability of intent framework by
22 * adding additional compilers or/and installers.
23 */
24public interface IntentExtensionService {
25 /**
26 * Registers the specified compiler for the given intent class.
27 *
toma1d16b62014-10-02 23:45:11 -070028 * @param cls intent class
Brian O'Connorb876bf12014-10-02 14:59:37 -070029 * @param compiler intent compiler
toma1d16b62014-10-02 23:45:11 -070030 * @param <T> the type of intent
Brian O'Connorb876bf12014-10-02 14:59:37 -070031 */
32 <T extends Intent> void registerCompiler(Class<T> cls, IntentCompiler<T> compiler);
33
34 /**
35 * Unregisters the compiler for the specified intent class.
36 *
37 * @param cls intent class
38 * @param <T> the type of intent
39 */
40 <T extends Intent> void unregisterCompiler(Class<T> cls);
41
42 /**
43 * Returns immutable set of bindings of currently registered intent compilers.
44 *
45 * @return the set of compiler bindings
46 */
47 Map<Class<? extends Intent>, IntentCompiler<? extends Intent>> getCompilers();
Brian O'Connorb876bf12014-10-02 14:59:37 -070048}