Package javax.management.openmbean

Examples of javax.management.openmbean.TabularData.values()


        /* sort the CompositeData objects by the index values */
        /* Sorting logic contributed by Jess Holle (SF id: jess_hole)*/
        final int dataRowsCount = tabularData.size();
        final TabularDataData  tabularDataData[] = new TabularDataData[dataRowsCount];
        int  ii = 0;
        for (Iterator it = tabularData.values().iterator(); it.hasNext();) {
            CompositeData compositeData = (CompositeData) it.next();
            final Object[] indices = compositeData.getAll(indexNames);
            tabularDataData[ii++] = new TabularDataData(indices, compositeData);
        }
        Arrays.sort(tabularDataData);
View Full Code Here


        assertTrue("Should find bundles importing org.osgi.jmx.framework", importingBundlesId.length > 0);

        TabularData table = packagaState.listPackages();
        assertNotNull("TabularData containing CompositeData with packages info shouldn't be null", table);
        assertEquals("TabularData should be a type PACKAGES", PackageStateMBean.PACKAGES_TYPE, table.getTabularType());
        Collection colData = table.values();
        assertNotNull("Collection of CompositeData shouldn't be null", colData);
        assertFalse("Collection of CompositeData should contain elements", colData.isEmpty());

        boolean isRemovalPending = packagaState.isRemovalPending("org.osgi.jmx.framework", "1.5.0", exportingBundles[0]);
        assertFalse("Should removal pending on org.osgi.jmx.framework be false", isRemovalPending);
View Full Code Here

        //headers

        TabularData headers = mbean.getHeaders(b.getBundleId());
        assertNotNull(headers);
        assertEquals(BundleStateMBean.HEADERS_TYPE, headers.getTabularType());
        assertTrue(headers.values().size() >= 4 );
        assertEquals("org.apache.aries.jmx.test.bundleb", Header.from(headers.get(new Object[] {Constants.BUNDLE_SYMBOLICNAME})).getValue());
       
        //hosts
       
        long[] hosts = mbean.getHosts(frag.getBundleId());
View Full Code Here

        // listBundles
       
        TabularData bundlesTable = mbean.listBundles();
        assertNotNull(bundlesTable);
        assertEquals(BundleStateMBean.BUNDLES_TYPE, bundlesTable.getTabularType());
        assertEquals(bundleContext.getBundles().length, bundlesTable.values().size());
       
       
        // notifications
       
        final List<Notification> received = new ArrayList<Notification>();
View Full Code Here

        // getProperties
       
        TabularData serviceProperties = mbean.getProperties(serviceBId);
        assertNotNull(serviceProperties);
        assertEquals(JmxConstants.PROPERTIES_TYPE, serviceProperties.getTabularType());
        assertTrue(serviceProperties.values().size() > 1);
        assertEquals("org.apache.aries.jmx.test.ServiceB",
                PropertyData.from(serviceProperties.get(new Object[] { Constants.SERVICE_PID })).getValue());
       
        // getUsingBundles
       
View Full Code Here

       
        // listServices
       
        TabularData allServices = mbean.listServices();
        assertNotNull(allServices);
        assertEquals(bundleContext.getAllServiceReferences(null, null).length, allServices.values().size());
       
        // notifications
       
        final List<Notification> received = new ArrayList<Notification>();
     
View Full Code Here

        }
        jg.writeEndObject();
      } else if(value instanceof TabularData) {
        TabularData tds = (TabularData)value;
        jg.writeStartArray();
        for(Object entry : tds.values()) {
          writeObject(jg, entry);
        }
        jg.writeEndArray();
      } else {
        jg.writeString(value.toString());
View Full Code Here

        mbean.createNewBinding(_queue.getName().toString(), "binding1");
        mbean.createNewBinding(_queue.getName().toString(), "binding2");

        TabularData data = mbean.bindings();
        ArrayList<Object> list = new ArrayList<Object>(data.values());
        assertTrue(list.size() == 2);

        // test general exchange properties
        assertEquals(mbean.getName(), "amq.direct");
        assertEquals(mbean.getExchangeType(), "direct");
View Full Code Here

        mbean.createNewBinding(_queue.getName().toString(), "binding1");
        mbean.createNewBinding(_queue.getName().toString(), "binding2");

        TabularData data = mbean.bindings();
        ArrayList<Object> list = new ArrayList<Object>(data.values());
        assertTrue(list.size() == 2);

        // test general exchange properties
        assertEquals(mbean.getName(), "amq.topic");
        assertEquals(mbean.getExchangeType(), "topic");
View Full Code Here

        mbean.createNewBinding(_queue.getName().toString(), "key1=binding1,key2=binding2");
        mbean.createNewBinding(_queue.getName().toString(), "key3=binding3");

        TabularData data = mbean.bindings();
        ArrayList<Object> list = new ArrayList<Object>(data.values());
        assertTrue(list.size() == 2);

        // test general exchange properties
        assertEquals(mbean.getName(), "amq.match");
        assertEquals(mbean.getExchangeType(), "headers");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.