Package javax.management.openmbean

Examples of javax.management.openmbean.OpenType


/*      */
/*  763 */     if ((value instanceof Map))
/*      */     {
/*  765 */       TabularDataSupport table = new TabularDataSupport(tabularType);
/*  766 */       CompositeType entryType = tabularType.getRowType();
/*  767 */       OpenType keyType = entryType.getType("key");
/*  768 */       OpenType valueType = entryType.getType("value");
/*      */
/*  770 */       Map m = (Map)value;
/*  771 */       for (Iterator i = m.entrySet().iterator(); i.hasNext(); )
/*      */       {
/*  773 */         Map.Entry entry = (Map.Entry)i.next();
View Full Code Here


/*  878 */     Object[] values = new Object[names.length];
/*      */
/*  880 */     for (int i = 0; i < names.length; i++)
/*      */     {
/*  882 */       String name = names[i];
/*  883 */       OpenType itemType = compositeType.getType(name);
/*  884 */       Method method = getCompositeDataMethod(clazz, name, itemType == SimpleType.BOOLEAN);
/*  885 */       Object itemValue = method.invoke(value, null);
/*  886 */       values[i] = construct(itemType, itemValue, context);
/*      */     }
/*  888 */     return new CompositeDataSupport(compositeType, names, values);
View Full Code Here

/*     */   }
/*     */
/*     */   private OpenMBeanParameterInfo buildParameter(int i, Type parameterType)
/*     */     throws Exception
/*     */   {
/* 313 */     OpenType openType = MXBeanUtils.getOpenType(parameterType);
/* 314 */     return new OpenMBeanParameterInfoSupport("arg" + i, "MBean Parameter.", openType);
/*     */   }
View Full Code Here

/*     */   {
/* 328 */     boolean isReadable = getter != null;
/* 329 */     boolean isWritable = setter != null;
/* 330 */     boolean isIs = false;
/*     */
/* 332 */     OpenType openType = null;
/* 333 */     if (getter != null)
/*     */     {
/* 335 */       openType = MXBeanUtils.getOpenType(getter.getGenericReturnType());
/* 336 */       if (getter.getName().startsWith("is"))
/* 337 */         isIs = true;
View Full Code Here

/*     */   {
/* 356 */     Type[] parameterTypes = method.getGenericParameterTypes();
/* 357 */     OpenMBeanParameterInfo[] parameterInfo = new OpenMBeanParameterInfo[parameterTypes.length];
/* 358 */     for (int i = 0; i < parameterTypes.length; i++)
/* 359 */       parameterInfo[i] = buildParameter(i, parameterTypes[i]);
/* 360 */     OpenType openType = MXBeanUtils.getOpenType(method.getGenericReturnType());
/* 361 */     return new OpenMBeanOperationInfoSupport(method.getName(), method.getName(), parameterInfo, openType, 1);
/*     */   }
View Full Code Here

            CompositeType compositeType = data.getCompositeType();
            Set keys = compositeType.keySet();
            for (Iterator iter = keys.iterator(); iter.hasNext();) {
                String key = (String) iter.next();
                Object value = data.get(key);
                OpenType type = compositeType.getType(key);
                if (type instanceof SimpleType) {
                    setProperty(propertyPrefix + "." + key, value);
                } else {
                    createProperty(propertyPrefix + "." + key, value);
                }
            }
        } else if (result instanceof TabularDataSupport) {
            TabularDataSupport data = (TabularDataSupport) result;
            for (Iterator iter = data.keySet().iterator(); iter.hasNext();) {
                Object key = iter.next();
                for (Iterator iter1 = ((List) key).iterator(); iter1.hasNext();) {
                    Object key1 = iter1.next();
                    CompositeData valuedata = data.get(new Object[] { key1 });
                    Object value = valuedata.get("value");
                    OpenType type = valuedata.getCompositeType().getType(
                            "value");
                    if (type instanceof SimpleType) {
                        setProperty(propertyPrefix + "." + key1, value);
                    } else {
                        createProperty(propertyPrefix + "." + key1, value);
View Full Code Here

        all.addAll(Arrays.asList(items));

        String names[] = new String[all.size()];
        String descriptions[] = new String[all.size()];
        OpenType types[] = new OpenType[all.size()];

        int n = 0;
        for (Item item : all) {
            names[n] = item.name;
            descriptions[n] = item.description;
View Full Code Here

  private static OpenType getOpenType(Class type)
  {
    try {
      if (type.isArray()) {
  OpenType component = getOpenType(type.getComponentType());

  if (component != null)
    return new ArrayType(1, component);
  else
    return null;
View Full Code Here

            // construct a Java type (Class) that has that java type as its
            // component (java) type.  I think the only way to do this
            // is to call Array.newInstance, and then take the class from the
            // resulting array instance.
      final ArrayType at = (ArrayType)ot ;
      final OpenType cot = at.getElementOpenType() ;
      final Class cjt = getJavaClass( cot ) ;
      final Object temp = Array.newInstance( cjt, 0 ) ;
      return temp.getClass() ;
  } else if (ot instanceof TabularType) {
      return TabularData.class ;
View Full Code Here

    }

    // Make sure that EINT is replaced with EINTW, etc.
    // We only want wrapped types for primitives.
    private static EvaluatedType canonicalType( EvaluatedType et ) {
        OpenType ot = simpleTypeMap.get( et ) ;
        if (ot == null) {
            return et ;
        } else {
            return simpleOpenTypeMap.get( ot ) ;
        }
View Full Code Here

TOP

Related Classes of javax.management.openmbean.OpenType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.