Package java.util

Examples of java.util.Map.keySet()


         super(new String[] {});
      }

      protected void doInit(Global global, PluginInfo pluginInfo) throws XmlBlasterException {
         Map map = InfoHelper.getPropertiesStartingWith("test.one.two.", this, null);
         String[] keys = (String[])map.keySet().toArray(new String[map.size()]);
         for (int i=0; i < keys.length; i++) {
            log.info("KEY " + keys[i] + " : value " + (String)map.get(keys[i]));
         }
        
      }
View Full Code Here


         log.info("   -erase.forceDestroy " + eraseForceDestroy);
         log.info("   -erase.domain   " + ((domain==null)?"":domain));
         log.info(" ConnectQos settings");
         log.info("   -connect/qos/persistent " + connectPersistent);
         if (connectQosClientPropertyMap != null) {
            Iterator it = connectQosClientPropertyMap.keySet().iterator();
            while (it.hasNext()) {
               String key = (String)it.next();
               log.info("   -connect/qos/clientProperty["+key+"]   " + connectQosClientPropertyMap.get(key).toString());
            }
         }
View Full Code Here

            qos.setPersistent(connectPersistent);
         }
         // "__remoteProperties"
         qos.getData().addClientProperty(Constants.CLIENTPROPERTY_REMOTEPROPERTIES, true);
         if (connectQosClientPropertyMap != null) {
            Iterator it = connectQosClientPropertyMap.keySet().iterator();
            while (it.hasNext()) {
               String key = (String)it.next();
               qos.addClientProperty(key, connectQosClientPropertyMap.get(key).toString());
            }
         }
View Full Code Here

      String names = "";
      String[] env = { "cluster.node", "cluster.node.info", "cluster.node.master" };
      for (int ii=0; ii<env.length; ii++) {
         Map nodeMap = this.glob.getProperty().get(env[ii], (Map)null);
         if (nodeMap != null) {
            Iterator iter = nodeMap.keySet().iterator();
            if (log.isLoggable(Level.FINE)) log.fine("Found -" + env[ii] + " with " + nodeMap.size() + " array size, ii=" + ii);
            while (iter.hasNext()) {
               String nodeIdName = (String)iter.next();       // e.g. "heron" from "cluster.node.master[heron]=..."
               String xml = (String)nodeMap.get(nodeIdName)// The "<clusternode>..." xml ASCII string for heron
               if (xml == null || xml.length() < 1) {
View Full Code Here

   public synchronized void initializePlugins() throws XmlBlasterException {
      pluginMap.clear();
      mimeCache.clear();
      Map map = glob.getProperty().get(pluginPropertyName, (Map)null);
      if (map != null) {
         Iterator iterator = map.keySet().iterator();
         while (iterator.hasNext()) {
            String key = (String)iterator.next(); // contains "PublishFilterLen:1.0", the type and version are separated by a ":"
            String type = key.substring(0, key.indexOf(":"));
            String version = key.substring(key.indexOf(":")+1);
            I_PublishFilter plugin = (I_PublishFilter)getPluginObject(type, version);
View Full Code Here

  
   private void initJmx() {
      Map jmxMap = InfoHelper.getObjectsWithKeyStartingWith(JMX_PREFIX, this, null);
      if (jmxMap.size() < 1)
         return;
      String[] keys = (String[])jmxMap.keySet().toArray(new String[jmxMap.size()]);
      for (int i=0; i < keys.length; i++) {
         Object obj = jmxMap.get(keys[i]);
         String name = keys[i];
         ContextNode child = new ContextNode(ContextNode.CONTRIB_MARKER_TAG, name, this.contextNode);
         log.info("MBean '" + name + "' found. Will attach it as '" + child.getRelativeName() + "' to '" + this.contextNode.getAbsoluteName() + "'");
View Full Code Here

        
         sched = schedFact.getScheduler();
         sched.start();
         String prefix = "scheduler.";
         Map map = InfoHelper.getPropertiesStartingWith(prefix, this, null);
         String[] keys = (String[])map.keySet().toArray( new String[map.size()]);
         for (int i=0; i < keys.length; i++) {
            String value = get("scheduler." + keys[i], "").trim();
            addSchedulerWithEx(keys[i], value);
         }
      }
View Full Code Here

        assertTrue(tlh.initCalled);
        Map cfg = tlh.config;
        assertNotNull(tlh.config);

        assertEquals(2, cfg.keySet().size());
        Iterator iter = cfg.keySet().iterator();
        assertEquals("foo", iter.next());
        assertEquals("1", cfg.get("foo"));
        assertEquals("bar", iter.next());
        assertEquals("2", cfg.get("bar"));
View Full Code Here

        assertTrue(tlh.initCalled);
        Map cfg = tlh.config;
        assertNotNull(tlh.config);

        assertEquals(2, cfg.keySet().size());
        Iterator iter = cfg.keySet().iterator();
        assertEquals("foo", iter.next());
        assertEquals("1", cfg.get("foo"));
        assertEquals("bar", iter.next());
        assertEquals("2", cfg.get("bar"));
    }
View Full Code Here

        TestLogicalHandler tlh = (TestLogicalHandler)chain.get(0);

        assertTrue(tlh.initCalled);
        Map cfg = tlh.config;
        assertNotNull(tlh.config);
        assertEquals(2, cfg.keySet().size());
    }

    public void testBuilderCannotLoadHandlerClass() {
        HandlerChainType hc = createHandlerChainType();
        hc.getHandler().remove(3);
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.