Examples of WatchConfig


Examples of hermes.config.WatchConfig

            try
            {
               for (Iterator iter = HermesBrowser.getBrowser().getConfig().getWatch().iterator(); iter.hasNext();)
               {
                  final WatchConfig config = (WatchConfig) iter.next();
                  final AddToExistingWatchAction action = new AddToExistingWatchAction(config);

                  watchMenu.add(new JMenuItem(action));
                  watchMenu.addPropertyChangeListener("enabled", new PropertyChangeListener()
                  {
View Full Code Here

Examples of hermes.config.WatchConfig

    WatchDockableFrame frame = null;

    if (queueWatchFrames.containsKey(watchId)) {
      frame = queueWatchFrames.get(watchId);
    } else {
      WatchConfig wConfig = HermesBrowser.getConfigDAO().createWatchConfig();
      wConfig.setId(watchId);

      frame = createWatch(wConfig);
    }

    frame.addWatch(hermes);
View Full Code Here

Examples of hermes.config.WatchConfig

    WatchDockableFrame frame = null;

    if (queueWatchFrames.containsKey(watchId)) {
      frame = queueWatchFrames.get(watchId);
    } else {
      WatchConfig wConfig = HermesBrowser.getConfigDAO().createWatchConfig();
      wConfig.setId(watchId);

      frame = createWatch(wConfig);
    }

    DestinationConfig dConfig = HermesBrowser.getConfigDAO().duplicateForWatch(destination, hermes);
View Full Code Here

Examples of hermes.config.WatchConfig

      final ArrayList tmpList = new ArrayList();
      tmpList.addAll(loader.getConfig().getWatch());
      loader.getConfig().getWatch().clear();

      for (Iterator iter = tmpList.iterator(); iter.hasNext();) {
        WatchConfig wConfig = (WatchConfig) iter.next();
        createWatch(wConfig);
      }
    }

    setTitle("HermesJMS - " + TextUtils.crumble(getCurrentConfigURL(), 100));
View Full Code Here

Examples of hermes.config.WatchConfig

      if (config.getWatch() == null) {
        //
        // Maybe an upgrade from a pre-1.6 version, fill in what should
        // be there in the config.

        WatchConfig wConfig = new WatchConfig();

        wConfig.setShowAge(true);
        config.getWatch().add(wConfig);
      }

      for (Iterator iter = config.getFactory().iterator(); iter.hasNext();) {
        final FactoryConfig factoryConfig = (FactoryConfig) iter.next();
View Full Code Here

Examples of hermes.config.WatchConfig

    *
    * @see hermes.impl.ConfigDAO#createWatchConfig()
    */
   public WatchConfig createWatchConfig()
   {
      WatchConfig rval = new WatchConfig();

      rval.setShowAge(true);
      rval.setUpdateFrequency(30 * 1000L);

      return rval;
   }
View Full Code Here

Examples of hermes.config.WatchConfig

      messageStoreMessageFactory = new PropertyImpl(MESSAGE_STORE_MESSAGE_FACTORY, config.getMessageStoreMessageFactory(), MESSAGE_STORE_MESSAGE_FACTORY_INFO,
            Hermes.class);

      for (Iterator iter = config.getWatch().iterator(); iter.hasNext();)
      {
         final WatchConfig wConfig = (WatchConfig) iter.next();
         final Property watchIdProperty = new PropertyImpl(wConfig.getId(), WATCH_INFO + " for " + wConfig.getId());

         final Property watchFrequenceProperty = new PropertyImpl(WATCH_UPDATE_FREQUENCY, new Long(wConfig.getUpdateFrequency()), WATCH_UPDATE_FREQUENCY_INFO,
               Long.class);
         final Property watchAgeAlertProperty = new PropertyImpl(WATCH_AGE_ALERT, new Long(wConfig.getDefaultAgeAlertThreshold()), WATCH_AGE_ALERT_INFO,
               Long.class);
         final Property watchDepthAlertProperty = new PropertyImpl(WATCH_DEPTH_ALERT, new Integer(wConfig.getDefaultDepthAlertThreshold()),
               WATCH_DEPTH_ALERT_INFO, Integer.class);
         final Property showAgeProperty = new PropertyImpl(SHOW_AGE, new Boolean(wConfig.isShowAge()), SHOW_AGE_INFO, Boolean.class);

         watchIdProperty.addChild(watchFrequenceProperty);
         watchIdProperty.addChild(watchAgeAlertProperty);
         watchIdProperty.addChild(watchDepthAlertProperty);
         watchIdProperty.addChild(showAgeProperty);

         watchProperty.addChild(watchIdProperty);

         //
         // Much easier to create an object here to set the values into the
         // model.

         watchSetters.add(new Runnable()
         {
            public void run()
            {
               if (showAgeProperty.getValue() != null)
               {
                  wConfig.setShowAge(((Boolean) showAgeProperty.getValue()).booleanValue());
               }

               if (watchAgeAlertProperty.getValue() != null)
               {
                  if (watchAgeAlertProperty.getValue() instanceof Long)
                  {
                     wConfig.setDefaultAgeAlertThreshold(((Long) watchAgeAlertProperty.getValue()).longValue());
                  }
                  else
                  {
                     wConfig.setDefaultAgeAlertThreshold(((Long) watchAgeAlertProperty.getValue()).longValue());
                  }
               }

               if (watchDepthAlertProperty.getValue() != null)
               {
                  wConfig.setDefaultDepthAlertThreshold(((Integer) watchDepthAlertProperty.getValue()).intValue());
               }

               if (watchFrequenceProperty.getValue() != null)
               {
                  if (watchFrequenceProperty.getValue() instanceof Long)
                  {
                     wConfig.setUpdateFrequency(((Long) watchFrequenceProperty.getValue()).longValue());
                  }
                  else
                  {
                     wConfig.setUpdateFrequency(((Long) watchFrequenceProperty.getValue()).longValue());
                  }
               }

               HermesBrowser.getBrowser().getWatchFrame(wConfig.getId()).updateConfig();
            }
         });
      }

      auditDirectoryProperty.setEditorContext(DirectoryCellEditor.CONTEXT);
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.