blob: 3dae379f2ecee25c9b5d25c65834de80ca5c3e14 [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 configurations which specify how the discovered
22 * network information should be interpretted and how the network should be
23 * configured.
24 */
25public interface NetworkConfigService {
26
27 /**
28 * Returns the set of subjects for which some configuration is available.
29 *
30 * @param subjectClass subject class
31 * @return set of configured subjects
32 */
33 <T> Set<T> getSubjects(Class<T> subjectClass);
34
35 /**
36 * Returns the set of subjects for which the specified configuration is
37 * available.
38 *
39 * @param subjectClass subject class
40 * @param configClass configuration class
41 * @return set of configured subjects
42 */
43 <T> Set<T> getSubjects(Class<T> subjectClass, Class<Config<T>> configClass);
44
45
46 /**
47 * Returns all configurations for the specified subject.
48 *
49 * @param subject configuration subject
50 * @return set of configurations
51 */
52 <T> Set<Config<T>> getConfigs(T subject);
53
54 /**
55 * Returns the configuration for the specified subject and configuration
56 * class if one is available; null otherwise.
57 *
58 * @param subject configuration subject
59 * @param configClass configuration class
60 * @return configuration or null if one is not available
61 */
62 <T> Config<T> getConfig(T subject, Class<Config<T>> configClass);
63
64}