Package javax.management.openmbean

Examples of javax.management.openmbean.TabularData


          region,
          statistics.getSecondLevelCacheStatistics( region )
      );
      list.add( l2CacheStats.toCompositeData() );
    }
    TabularData td = CacheRegionStats.newTabularDataInstance();
    td.putAll( list.toArray( new CompositeData[list.size()] ) );
    return td;
  }
View Full Code Here


            }
            messageIDs[i] = (String)cdata.get("JMSMessageID");
            echo("message " + i + " : " + cdata.values());
        }

        TabularData table = proxy.browseAsTable();
        echo("Found tabular data: " + table);
        assertTrue("Table should not be empty!", table.size() > 0);

        assertEquals("Queue size", MESSAGE_COUNT, proxy.getQueueSize());

        String messageID = messageIDs[0];
        String newDestinationName = "queue://dummy.test.cheese";
View Full Code Here

                    features.add(new JmxFeature(feature, insFeatures.contains(feature)));
                } catch (Throwable t) {
                    t.printStackTrace();
                }
            }
            TabularData table = JmxFeature.tableFrom(features);
            return table;
        } catch (Throwable t) {
            t.printStackTrace();
            return null;
        }
View Full Code Here

            List<Repository> allRepositories = Arrays.asList(featuresService.listRepositories());
            ArrayList<JmxRepository> repositories = new ArrayList<JmxRepository>();
            for (Repository repository : allRepositories) {
                repositories.add(new JmxRepository(repository));
            }
            TabularData table = JmxRepository.tableFrom(repositories);
            return table;
        } catch (Throwable t) {
            t.printStackTrace();
            return null;
        }
View Full Code Here

    public void testViewEffectiveRuntimeLoggerLevels() throws Exception
    {
        final String qpidMainLogger = "org.apache.qpid";

        TabularData table = _loggingManagement.viewEffectiveRuntimeLoggerLevels();
        final CompositeData row = table.get(new String[] {qpidMainLogger} );
        assertChannelRow(row, qpidMainLogger, "DEBUG");
    }
View Full Code Here

    public void testViewConfigFileLoggerLevels() throws Exception
    {
        final String operationalLoggingLogger = "qpid.message";

        TabularData table = _loggingManagement.viewConfigFileLoggerLevels();
        final CompositeData row = table.get(new String[] {operationalLoggingLogger} );
        assertChannelRow(row, operationalLoggingLogger, "INFO");
    }
View Full Code Here

        _loggingManagement.setRuntimeLoggerLevel(logger, "OFF");

        List<String> matches = _monitor.findMatches("Setting level to OFF for logger 'org.apache.qpid'");
        assertEquals(1, matches.size());

        TabularData table = _loggingManagement.viewEffectiveRuntimeLoggerLevels();
        final CompositeData row1 = table.get(new String[] {logger} );
        assertChannelRow(row1, logger, "OFF");
    }
View Full Code Here

        assertEffectiveLoggingLevel(operationalLoggingLogger, "OFF");
    }

    private void assertEffectiveLoggingLevel(String operationalLoggingLogger, String expectedLevel)
    {
        TabularData table = _loggingManagement.viewEffectiveRuntimeLoggerLevels();
        final CompositeData row1 = table.get(new String[] {operationalLoggingLogger} );
        assertChannelRow(row1, operationalLoggingLogger, expectedLevel);
    }
View Full Code Here

        final Message sentMessage = sentMessages.get(0);

        assertEquals("Unexpected queue depth", 1, _managedSourceQueue.getMessageCount().intValue());

        // Check the contents of the message
        final TabularData tab = _managedSourceQueue.viewMessages(1l, 1l);
        assertEquals("Unexpected number of rows in table", 1, tab.size());
        final Iterator<CompositeData> rowItr = (Iterator<CompositeData>) tab.values().iterator();

        final CompositeData row1 = rowItr.next();
        assertNotNull("Message should have AMQ message id", row1.get(ManagedQueue.MSG_AMQ_ID));
        assertEquals("Unexpected queue position", 1l, row1.get(ManagedQueue.MSG_QUEUE_POS));
        assertEquals("Unexpected redelivered flag", Boolean.FALSE, row1.get(ManagedQueue.MSG_REDELIVERED));
View Full Code Here

    private List<Long> getAMQMessageIdsOn(ManagedQueue managedQueue, long startIndex, long endIndex) throws Exception
    {
        final SortedSet<Long> messageIds = new TreeSet<Long>();

        final TabularData tab = managedQueue.viewMessages(startIndex, endIndex);
        final Iterator<CompositeData> rowItr = (Iterator<CompositeData>) tab.values().iterator();
        while(rowItr.hasNext())
        {
            final CompositeData row = rowItr.next();
            long amqMessageId = (Long)row.get(ManagedQueue.MSG_AMQ_ID);
            messageIds.add(amqMessageId);
View Full Code Here

TOP

Related Classes of javax.management.openmbean.TabularData

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.