Package javax.management.openmbean

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


        EasyMock.expect(i.getJavaOpts()).andReturn("someopts");
        EasyMock.replay(i);
       
        JmxInstance ji = new JmxInstance(i);
        TabularData td = JmxInstance.tableFrom(Collections.singletonList(ji));       
        Collection<?> keys = (Collection<?>) td.keySet().iterator().next();
        Assert.assertEquals("MyInstance", keys.iterator().next());
       
        CompositeData cd = td.get(keys.toArray());
        Assert.assertEquals(1712, cd.get("Pid"));
        Assert.assertEquals("MyInstance", cd.get("Name"));
View Full Code Here


        EasyMock.expect(i.getJavaOpts()).andReturn(null);
        EasyMock.replay(i);
       
        JmxInstance ji = new JmxInstance(i);
        TabularData td = JmxInstance.tableFrom(Collections.singletonList(ji));       
        Collection<?> keys = (Collection<?>) td.keySet().iterator().next();
        Assert.assertEquals("MyInstance", keys.iterator().next());
       
        CompositeData cd = td.get(keys.toArray());
        Assert.assertEquals(1712, cd.get("Pid"));
        Assert.assertEquals("MyInstance", cd.get("Name"));
View Full Code Here

            String format = "%-41s%-19s%-29s%-26s%-15s%-15s%s%n";
            List<String> indexNames = tabularData.getTabularType().getIndexNames();
            System.out.printf(format, toArray(indexNames, Object.class));

            Set<?> values = tabularData.keySet();
            for (Object eachValue : values)
            {
                List<?> value = (List<?>) eachValue;
                System.out.printf(format, toArray(value, Object.class));
            }
View Full Code Here

        String format = "%-41s%-19s%-29s%-26s%-15s%-15s%s%n";
        List<String> indexNames = tabularData.getTabularType().getIndexNames();
        out.printf(format, (Object[]) indexNames.toArray(new String[indexNames.size()]));

        Set<?> values = tabularData.keySet();
        for (Object eachValue : values)
        {
            List<?> value = (List<?>) eachValue;
            out.printf(format, value.toArray(new Object[value.size()]));
        }
View Full Code Here

        EasyMock.expect(instance.getLocation()).andReturn("somewhere");
        EasyMock.expect(instance.getJavaOpts()).andReturn("someopts");
        EasyMock.replay(instance);
       
        TabularData td = InstanceToTableMapper.tableFrom(Collections.singletonList(instance));
        Collection<?> keys = (Collection<?>) td.keySet().iterator().next();
        Assert.assertEquals("MyInstance", keys.iterator().next());
       
        CompositeData cd = td.get(keys.toArray());
        Assert.assertEquals(1712, cd.get("Pid"));
        Assert.assertEquals("MyInstance", cd.get("Name"));
View Full Code Here

        EasyMock.expect(instance.getLocation()).andReturn(null);
        EasyMock.expect(instance.getJavaOpts()).andReturn(null);
        EasyMock.replay(instance);
       
        TabularData td = InstanceToTableMapper.tableFrom(Collections.singletonList(instance));       
        Collection<?> keys = (Collection<?>) td.keySet().iterator().next();
        Assert.assertEquals("MyInstance", keys.iterator().next());
       
        CompositeData cd = td.get(keys.toArray());
        Assert.assertEquals(1712, cd.get("Pid"));
        Assert.assertEquals("MyInstance", cd.get("Name"));
View Full Code Here

            String format = "%-41s%-19s%-29s%-26s%-15s%-15s%s%n";
            List<String> indexNames = tabularData.getTabularType().getIndexNames();
            System.out.printf(format, toArray(indexNames, Object.class));

            Set<?> values = tabularData.keySet();
            for (Object eachValue : values)
            {
                List<?> value = (List<?>) eachValue;
                System.out.printf(format, toArray(value, Object.class));
            }
View Full Code Here

        String format = "%-41s%-19s%-29s%-26s%-15s%-15s%s%n";
        List<String> indexNames = tabularData.getTabularType().getIndexNames();
        out.printf(format, (Object[]) indexNames.toArray(new String[indexNames.size()]));

        Set<?> values = tabularData.keySet();
        for (Object eachValue : values)
        {
            List<?> value = (List<?>) eachValue;
            out.printf(format, value.toArray(new Object[value.size()]));
        }
View Full Code Here

   
    final TabularData  data  = (TabularData)o;
    final TabularType  type  = data.getTabularType();
   
    final List    indexNames  = type.getIndexNames();
    final Set    rowKeys    = data.keySet();
    final Iterator  rowIter  = rowKeys.iterator();
    int        rowIndex  = 0;
    while ( rowIter.hasNext() )
    {
      final Object[]    key    = (Object[])rowIter.next();
View Full Code Here

            String format = "%-41s%-19s%-29s%-26s%-15s%-15s%s%n";
            List<String> indexNames = tabularData.getTabularType().getIndexNames();
            System.out.printf(format, toArray(indexNames, Object.class));

            Set<?> values = tabularData.keySet();
            for (Object eachValue : values)
            {
                List<?> value = (List<?>) eachValue;
                System.out.printf(format, toArray(value, Object.class));
            }
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.