Package javax.management.openmbean

Examples of javax.management.openmbean.CompositeDataSupport


            ObjectName oName = oi.getObjectName();
            MemoryPool memoryPool = new MemoryPool();
            memoryPool.setName(JmxTools.getStringAttr(mBeanServer, oName, "Name"));
            memoryPool.setType(JmxTools.getStringAttr(mBeanServer, oName, "Type"));

            CompositeDataSupport cd = (CompositeDataSupport) mBeanServer.getAttribute(oName, "Usage");
            //
            // It seems that "Usage" attribute of one of the pools may turn into null intermittently. We better have a
            // dip in the graph then an NPE though.
            //
            if (cd != null) {
View Full Code Here


        this.compositeType = createCompositeType();
        this.tabularData = createTabularData();
    }
   
    public CompositeData createCompositeData(Object[] obj) throws Exception {
        CompositeData compData = new CompositeDataSupport(
                compositeType, itemNames, obj);
        return compData;
    }
View Full Code Here

      for (int i = 0; i < itemTypes.length; i++) {
        itemTypes[i] = SimpleType.STRING;
      }
      CompositeType propsType;
      propsType = new CompositeType("Properties type", "properties", keys, keys, itemTypes);
      CompositeDataSupport propsData = new CompositeDataSupport(propsType, properties);
      return propsData;
    } catch (OpenDataException e) {
      throw new AssertException("problem with jmx data generation", e);
    }
  }
View Full Code Here

  public VariableBinding getVariableBinding(Object mBeanNotifyUserObject,
                                            OID index) {
    Object value;
    if (mBeanNotifyUserObject instanceof CompositeDataSupport) {
      CompositeDataSupport data = (CompositeDataSupport)mBeanNotifyUserObject;
      value = data.get(attribute.getName());
    }
    else {
      value = mBeanNotifyUserObject;
    }
    Variable smiValue = (Variable) valueType.clone();
View Full Code Here

            for (int i = 0; i < bundles.length; i++) {
                try {
                    Bundle bundle = bundles[i];
                    BundleInfo info = bundleService.getInfo(bundle);
                    String bundleStateString = info.getState().toString();
                    CompositeData data = new CompositeDataSupport(bundleType,
                            new String[]{"ID", "Name", "Version", "Start Level", "State"},
                            new Object[]{info.getBundleId(), info.getSymbolicName(), info.getVersion(), info.getStartLevel(), bundleStateString});
                    table.put(data);
                } catch (Exception e) {
                    LOG.error(e.getMessage(), e);
View Full Code Here

                }
            }


            Object[] bindingItemValues = {count++, queueName, mappingList.toArray(new String[0])};
            CompositeData bindingData = new CompositeDataSupport(HEADERS_BINDING_DATA_TYPE,
                                                                 HEADERS_COMPOSITE_ITEM_NAMES_ARRAY,
                                                                 bindingItemValues);
            bindingList.put(bindingData);
        }
View Full Code Here

        }

        for(Map.Entry<String, List<String>> entry : bindingMap.entrySet())
        {
            Object[] bindingItemValues = {entry.getKey(), entry.getValue().toArray(new String[0])};
            CompositeData bindingData = new CompositeDataSupport(BINDING_DATA_TYPE,
                                                                 COMPOSITE_ITEM_NAMES_ARRAY,
                                                                 bindingItemValues);
            bindingList.put(bindingData);
        }
View Full Code Here

            final Map<String, Object> data = new HashMap<String, Object>();
            data.put(INDEX_COLUMN, i++);
            data.put(LEVEL_COLUMN, e.getStatus().toString());
            data.put(MESSAGE_COLUMN, e.getMessage());

            result.put(new CompositeDataSupport(LOG_ROW_TYPE, data));
        }
        return result;
    }
View Full Code Here

                return null;
            }
        }).when(_mockQueue).visit(Matchers.any(GetMessageVisitor.class));

        //now retrieve the content and verify its size
        CompositeDataSupport comp = (CompositeDataSupport) _queueMBean.viewMessageContent(messageNumber);
        assertNotNull(comp);
        byte[] data = (byte[]) comp.get(ManagedQueue.CONTENT);
        assertEquals(messageSize, data.length);
    }
View Full Code Here

                        version = row.get("version");
                    }
                }

                CompositeType ct = CamelOpenMBeanTypes.listComponentsCompositeType();
                CompositeData data = new CompositeDataSupport(ct, new String[]{"name", "description", "status", "type", "groupId", "artifactId", "version"},
                        new Object[]{name, description, status, type, groupId, artifactId, version});
                answer.put(data);
            }
            return answer;
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of javax.management.openmbean.CompositeDataSupport

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.