blob: 76e9bab8ca24fdcde954cad6b48d7eee1c3a74f4 [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 */
Thomas Vachuskad24aa7f2015-05-14 18:37:54 -070016package org.onosproject.incubator.net.config;
Thomas Vachuskaf0e1fae2015-04-24 00:51:51 -070017
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
Thomas Vachuska266b4432015-04-30 18:13:25 -070044 * @param <T> type of subject
45 * @return set of config factories
Thomas Vachuskaf0e1fae2015-04-24 00:51:51 -070046 */
47 <T> Set<ConfigFactory<T>> getConfigFactories(Class<T> subjectClass);
48
49 /**
50 * Returns the configuration type registered for the specified
51 * subject type and key.
52 *
53 * @param subjectClass subject class
Thomas Vachuska266b4432015-04-30 18:13:25 -070054 * @param configKey configuration key
55 * @param <T> type of subject
56 * @return config factory
Thomas Vachuskaf0e1fae2015-04-24 00:51:51 -070057 */
58 <T> ConfigFactory<T> getConfigFactory(Class<T> subjectClass, String configKey);
59
60 /**
61 * Returns the configuration type registered for the specified
62 * configuration class.
63 *
64 * @param configClass configuration class
Thomas Vachuska266b4432015-04-30 18:13:25 -070065 * @param <T> type of subject
66 * @return config factory
Thomas Vachuskaf0e1fae2015-04-24 00:51:51 -070067 */
68 <T> ConfigFactory<T> getConfigFactory(Class<Config<T>> configClass);
69
70}