Package javax.management.openmbean

Examples of javax.management.openmbean.CompositeDataSupport


    @SuppressWarnings("unchecked")
    public TabularData getGlobals() throws OpenDataException {
        TabularDataSupport globalsTable = new TabularDataSupport( globalsTableType );
        for ( Map.Entry<String, Class< ? >> global : ((Map<String, Class< ? >>) kbase.getGlobals()).entrySet() ) {
            Object[] itemValues = {global.getKey(), global.getValue().getName()};
            CompositeData result = new CompositeDataSupport( globalsType,
                                                             globalsColNames,
                                                             itemValues );
            globalsTable.put( result );
        }
        return globalsTable;
View Full Code Here


  Calendar cal = Calendar.getInstance();
  cal.set(1982, 11, 31);
  map.put("name","Andrew");
  map.put("Birthday",cal.getTime());
  map.put("alive",true);
  CompositeData data = new CompositeDataSupport(type, map);
  Person p = (Person) Proxy.newProxyInstance(Person.class.getClassLoader(),
               new Class[] { Person.class },
               new CompositeDataInvocationHandler(data));
  h.checkPoint("Accessor tests");
  h.check(p.getName(), "Andrew");
View Full Code Here

        if (configCompType == null)  {
            configCompType = new CompositeType("BrokerClusterInfoConfig", "BrokerClusterInfoConfig",
                        configBrokerInfoItemNames, configBrokerInfoItemDesc, configItemTypes);
        }

  cds = new CompositeDataSupport(configCompType,
      configBrokerInfoItemNames, brokerInfoItemValues);
 
  return (cds);
    }
View Full Code Here

            monitorCompType = new CompositeType("ProducerMonitorInfo", "ProducerMonitorInfo",
                        producerInfoMonitorItemNames, producerInfoMonitorItemDesc,
        producerInfoMonitorItemTypes);
        }

  cd = new CompositeDataSupport(monitorCompType,
      producerInfoMonitorItemNames, producerInfoMonitorItemValues);
 
  return (cd);
    }
View Full Code Here

        if (compType == null)  {
            compType = new CompositeType("BrokerClusterInfo", "BrokerClusterInfo",
            brokerInfoItemNames, brokerInfoItemDesc, itemTypes);
        }

  cds = new CompositeDataSupport(compType, brokerInfoItemNames, brokerInfoItemValues);
 
  return (cds);
    }
View Full Code Here

            monitorCompType = new CompositeType("ConsumerMonitorInfo", "ConsumerMonitorInfo",
                        consumerInfoMonitorItemNames, consumerInfoMonitorItemDesc,
        consumerInfoMonitorItemTypes);
        }

  cd = new CompositeDataSupport(monitorCompType,
      consumerInfoMonitorItemNames, consumerInfoMonitorItemValues);
 
  return (cd);
    }
View Full Code Here

            data.put("miss", cacheEntry.getMisses());
            data.put("hitRate", cacheEntry.getHitRate());
            data.put("missRate", cacheEntry.getMissRate());
            data.put("sizeInKB", cacheEntry.getBytes() / KB_IN_BYTES);

            tabularData.put(new CompositeDataSupport(cacheEntryType, data));
        }

        return tabularData;
    }
View Full Code Here

                values.put(NAME, packageInfo.name);
                values.put(VERSION, packageInfo.version.toString());
                values.put(REMOVAL_PENDING, packageInfo.isRemovalPending);
                values.put(EXPORTING_BUNDLES, Utils.toLongArray(Utils.getIds(packageInfo.exportingBundles.toArray(new Bundle[packageInfo.exportingBundles.size()]))));
                values.put(IMPORTING_BUNDLES, Utils.toLongArray(Utils.getIds(packageInfo.importingBundles.toArray(new Bundle[packageInfo.importingBundles.size()]))));
                dataSupport.put(new CompositeDataSupport(PACKAGE_TYPE, values));
            }
            return dataSupport;
        } catch (IOException e) {
            logVisitor.warning("listPackages error", e);
            throw e;
View Full Code Here

                    values.put(START_LEVEL, getStartLevel(bundle, startLevel));
                    values.put(STATE, getState(bundle));
                    values.put(SERVICES_IN_USE, Utils.toLongArray(getServicesInUse(bundle)));
                    values.put(SYMBOLIC_NAME, getSymbolicName(bundle));
                    values.put(VERSION, getVersion(bundle));
                    dataSupport.put(new CompositeDataSupport(BUNDLE_TYPE, values));
                }
            }
            return dataSupport;
        } catch (IOException e) {
            logVisitor.warning("listBundles error", e);
View Full Code Here

            Map<String, Object> values = new HashMap<String, Object>();
            values.put(IDENTIFIER, bundle.getBundleId());
            values.put(LOCATION, bundle.getLocation());
            values.put(SYMBOLIC_NAME, bundle.getSymbolicName());
            values.put(EVENT, event.getType());
            notification.setUserData(new CompositeDataSupport(BundleStateMBean.BUNDLE_EVENT_TYPE, values));

            nbs.sendNotification(notification);
        } catch (Exception e) {
            logVisitor.warning("Unable to send BundleEvent notification", 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.