Package javax.management.openmbean

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


        //try an invalid logger name
        assertFalse("Use of an invalid logger name was successfull", lm.setConfigFileLoggerLevel("made.up.logger.name", "info"));

        //retrieve the new values from the file and check them
        levels = (TabularDataSupport) lm.viewConfigFileLoggerLevels();
        records = levels.values();
        list = new HashMap<String,String>();
        for (Object o : records)
        {
            CompositeData data = (CompositeData) o;
            list.put(data.get(NAME_INDEX).toString(), data.get(LEVEL_INDEX).toString());
View Full Code Here


        Logger log = Logger.getLogger(TEST_LOGGER);
        log.setLevel(Level.toLevel("info"));
       
        //retrieve the current effective runtime logger level values
        TabularDataSupport levels = (TabularDataSupport) lm.viewEffectiveRuntimeLoggerLevels();
        Collection<Object> records = levels.values();
        Map<String,String> list = new HashMap<String,String>();
        for (Object o : records)
        {
            CompositeData data = (CompositeData) o;
            list.put(data.get(LOGGER_NAME).toString(), data.get(LOGGER_LEVEL).toString());
View Full Code Here

        //create child2 test logger
        Logger log2 = Logger.getLogger(TEST_LOGGER_CHILD2);
       
        //retrieve the current effective runtime logger level values
        levels = (TabularDataSupport) lm.viewEffectiveRuntimeLoggerLevels();
        records = levels.values();
        list = new HashMap<String,String>();
        for (Object o : records)
        {
            CompositeData data = (CompositeData) o;
            list.put(data.get(LOGGER_NAME).toString(), data.get(LOGGER_LEVEL).toString());
View Full Code Here

        //now change its level explicitly to "warn"
        log2.setLevel(Level.toLevel("warn"));
       
        //retrieve the current effective runtime logger level values
        levels = (TabularDataSupport) lm.viewEffectiveRuntimeLoggerLevels();
        records = levels.values();
        list = new HashMap<String,String>();
        for (Object o : records)
        {
            CompositeData data = (CompositeData) o;
            list.put(data.get(LOGGER_NAME).toString(), data.get(LOGGER_LEVEL).toString());
View Full Code Here

            fail("Could not create test LoggingManagementMBean");
        }

        //retrieve the current values
        TabularDataSupport levels = (TabularDataSupport) lm.viewConfigFileLoggerLevels();
        Collection<Object> records = levels.values();
        Map<String,String> list = new HashMap<String,String>();
        for (Object o : records)
        {
            CompositeData data = (CompositeData) o;
            list.put(data.get(LOGGER_NAME).toString(), data.get(LOGGER_LEVEL).toString());
View Full Code Here

        //try an invalid logger name
        assertFalse("Use of an invalid logger name was successfull", lm.setConfigFileLoggerLevel("made.up.logger.name", "info"));

        //retrieve the new values from the file and check them
        levels = (TabularDataSupport) lm.viewConfigFileLoggerLevels();
        records = levels.values();
        list = new HashMap<String,String>();
        for (Object o : records)
        {
            CompositeData data = (CompositeData) o;
            list.put(data.get(LOGGER_NAME).toString(), data.get(LOGGER_LEVEL).toString());
View Full Code Here

            //verify the DLE exchange exists, has the expected type, and a single binding for the DLQ
            ManagedExchange exchange = jmxUtils.getManagedExchange(QUEUE_WITH_DLQ_NAME + "_DLE");
            assertEquals("Wrong exchange type", "fanout", exchange.getExchangeType());
            TabularDataSupport bindings = (TabularDataSupport) exchange.bindings();
            assertEquals(1, bindings.size());
            for(Object o : bindings.values())
            {
                CompositeData binding = (CompositeData) o;

                String bindingKey = (String) binding.get(ManagedExchange.BINDING_KEY);
                String[] queueNames = (String[]) binding.get(ManagedExchange.QUEUE_NAMES);
View Full Code Here

      if (tdata != null)
      {
         jobs = new ArrayList<Job>();

         // tdata contains a hashmap, so extract the values of the map, which are CompositeDataSupport type.
         for (Iterator it = tdata.values().iterator(); it.hasNext();)
         {
            // this is a mess, because we don't know what the data wtype will be...
            Object object = (Object) it.next();
            // only deal with javax.management.openmbean.CompositeDataSupport
            if (!(object instanceof CompositeDataSupport))
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.