de4b582abfff25cb7eea38a5457142f8b0cd9c78
[controller.git] / opendaylight / config / config-api / src / main / java / org / opendaylight / controller / config / api / jmx / constants / ConfigRegistryConstants.java
1 /*
2  * Copyright (c) 2013, 2017 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.jmx.constants;
9
10 import javax.management.MalformedObjectNameException;
11 import javax.management.ObjectName;
12
13 public final class ConfigRegistryConstants {
14
15     private ConfigRegistryConstants() {
16     }
17
18     public static final String TYPE_CONFIG_REGISTRY = "ConfigRegistry";
19
20     public static final String TYPE_CONFIG_REGISTRY_NO_NOTIFICATIONS = "ConfigRegistryNoNotifications";
21
22     public static final String ON_DOMAIN = "org.opendaylight.controller";
23
24     public static final String TYPE_KEY = "type";
25
26     public static final ObjectName OBJECT_NAME = createONWithDomainAndType(TYPE_CONFIG_REGISTRY);
27
28     public static final ObjectName OBJECT_NAME_NO_NOTIFICATIONS = createONWithDomainAndType(
29             TYPE_CONFIG_REGISTRY_NO_NOTIFICATIONS);
30
31     public static final String GET_AVAILABLE_MODULE_NAMES_ATTRIBUT_NAME = "AvailableModuleNames";
32
33     public static ObjectName createONWithDomainAndType(final String type) {
34         return createON(ON_DOMAIN, TYPE_KEY, type);
35     }
36
37     public static ObjectName createON(final String name, final String key, final String value) {
38         try {
39             return new ObjectName(name, key, value);
40         } catch (final MalformedObjectNameException e) {
41             throw new IllegalArgumentException(e);
42         }
43
44     }
45 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.