blob: 711279b617009a6748244dd94695130c460b2a70 [file] [log] [blame]
Thomas Vachuskaf0e1fae2015-04-24 00:51:51 -07001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * 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
7 *
8 * 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.
15 */
16package org.onosproject.exp.net.config;
17
18import java.util.Set;
19
20/**
21 * Service for tracking network configuration factories.
22 */
23public interface NetworkConfigRegistry {
24
25 /**
26 * Registers the specified configuration factory.
27 *
28 * @param configFactory configuration factory
29 */
30 void registerConfigFactory(ConfigFactory configFactory);
31
32 /**
33 * Unregisters the specified configuration factory.
34 *
35 * @param configFactory configuration factory
36 */
37 void unregisterConfigFactory(ConfigFactory configFactory);
38
39 /**
40 * Returns set of configuration factories available for the specified
41 * class of subject.
42 *
43 * @param subjectClass subject class
44 */
45 <T> Set<ConfigFactory<T>> getConfigFactories(Class<T> subjectClass);
46
47 /**
48 * Returns the configuration type registered for the specified
49 * subject type and key.
50 *
51 * @param subjectClass subject class
52 */
53 <T> ConfigFactory<T> getConfigFactory(Class<T> subjectClass, String configKey);
54
55 /**
56 * Returns the configuration type registered for the specified
57 * configuration class.
58 *
59 * @param configClass configuration class
60 */
61 <T> ConfigFactory<T> getConfigFactory(Class<Config<T>> configClass);
62
63}