Bug 2697: Improvement wrong response handling, missing message
[controller.git] / opendaylight / config / config-api / src / main / java / org / opendaylight / controller / config / api / LookupRegistry.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.config.api;
9
10 import java.util.Set;
11 import javax.management.InstanceNotFoundException;
12 import javax.management.ObjectName;
13
14 public interface LookupRegistry {
15
16     /**
17      * Find all modules. Same Module can be registered multiple times.
18      *
19      * @return objectNames
20      */
21     Set<ObjectName> lookupConfigBeans();
22
23     /**
24      * Find modules with given module name.
25      *
26      * @param moduleName
27      * @return objectNames
28      */
29     Set<ObjectName> lookupConfigBeans(String moduleName);
30
31     /**
32      * Find read modules.
33      *
34      * @param moduleName
35      *            exact match for searched module name, can contain '*' to match
36      *            all values.
37      * @param instanceName
38      *            exact match for searched instance name, can contain '*' to
39      *            match all values.
40      * @return objectNames
41      */
42     Set<ObjectName> lookupConfigBeans(String moduleName, String instanceName);
43
44     /**
45      * Find read module.
46      *
47      * @param moduleName
48      *            exact match for searched module name, can contain '*' to match
49      *            all values.
50      * @param instanceName
51      *            exact match for searched instance name, can contain '*' to
52      *            match all values.
53      * @return objectNames
54      * @throws InstanceNotFoundException
55      *             if search did not find exactly one instance
56      */
57     ObjectName lookupConfigBean(String moduleName, String instanceName)
58             throws InstanceNotFoundException;
59
60     /**
61      * Check that object name corresponds with existing module.
62      *
63      * @throws InstanceNotFoundException
64      *             if search did not find exactly one instance
65      */
66     void checkConfigBeanExists(ObjectName objectName) throws InstanceNotFoundException;
67
68
69     /**
70      * @return qNames of all ModuleFactory instances in the system
71      */
72     Set<String> getAvailableModuleFactoryQNames();
73
74 }