/* * Copyright (c) OSGi Alliance (2009). All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.osgi.jmx; import java.util.Arrays; import java.util.Collections; import java.util.List; import javax.management.openmbean.ArrayType; import javax.management.openmbean.CompositeType; import javax.management.openmbean.SimpleType; import javax.management.openmbean.TabularType; /** * Constants for OSGi JMX Specification. * * Additionally, this class contains a number of utility types that are used in * different places in the specification. These are {@link #LONG_ARRAY_TYPE}, * {@link #STRING_ARRAY_TYPE}, and {@link #PROPERTIES_TYPE}. * * @version $Rev$ * @Immutable */ public class JmxConstants { /* * Empty constructor to make sure this is not used as an object. */ private JmxConstants() { // empty } /** * The MBean Open type for an array of strings */ public static final ArrayType STRING_ARRAY_TYPE = Item .arrayType( 1, SimpleType.STRING); /** * The MBean Open type for an array of longs */ public static final ArrayType LONG_ARRAY_TYPE = Item .arrayType( 1, SimpleType.LONG); /** * For an encoded array we need to start with ARRAY_OF. This must be * followed by one of the names in {@link #SCALAR}. * */ public final static String ARRAY_OF = "Array of "; /** * For an encoded vector we need to start with ARRAY_OF. This must be * followed by one of the names in {@link #SCALAR}. */ public final static String VECTOR_OF = "Vector of "; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * {@link org.osgi.framework.Version} */ public static final String VERSION = "Version"; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * {@link java.lang.String} */ public static final String STRING = "String"; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * {@link java.lang.Integer} */ public static final String INTEGER = "Integer"; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * {@link java.lang.Long} */ public static final String LONG = "Long"; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * {@link java.lang.Float} */ public static final String FLOAT = "Float"; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * {@link java.lang.Double} */ public static final String DOUBLE = "Double"; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * {@link java.lang.Byte} */ public static final String BYTE = "Byte"; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * {@link java.lang.Short} */ public static final String SHORT = "Short"; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * {@link java.lang.Character} */ public static final String CHARACTER = "Character"; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * {@link java.lang.Boolean} */ public static final String BOOLEAN = "Boolean"; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * {@link java.math.BigDecimal} */ public static final String BIGDECIMAL = "BigDecimal"; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * {@link java.math.BigInteger} */ public static final String BIGINTEGER = "BigInteger"; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * the double primitive type. */ public static final String P_DOUBLE = "double"; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * the float primitive type. */ public static final String P_FLOAT = "float"; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * the long primitive type. */ public static final String P_LONG = "long"; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * the int primitive type. */ public static final String P_INT = "int"; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * the short primitive type. */ public static final String P_SHORT = "short"; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * the byte primitive type. */ public static final String P_BYTE = "byte"; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * the char primitive type. */ public static final String P_CHAR = "char"; /** * Value for {@link #PROPERTY_TYPE} Type value in the case of * the boolean primitive type. */ public static final String P_BOOLEAN = "boolean"; /** * A set of all scalars that can be used in the {@link #TYPE} property of a * {@link #PROPERTIES_TYPE}. This contains the following names: *