Package hermes.config

Examples of hermes.config.DestinationConfig


              if (iter.hasNext()) {
                selector.append(" OR ");
              }
            }

            final DestinationConfig dConfig = HermesBrowser.getConfigDAO().duplicate(destinationNode.getConfig());
            dConfig.setSelector(selector.toString());

            HermesBrowser.getBrowser().getActionFactory().createQueueBrowseAction(hermesNode.getHermes(), dConfig);
          }
        }
      }
View Full Code Here


               if (sessionConfig.getId().equals(hermesId))
               {
                  for (Iterator<?> iter2 = factoryConfig.getDestination().iterator(); iter2.hasNext();)
                  {
                     DestinationConfig destinationConfig = (DestinationConfig) iter2.next();

                     if (destinationConfig.getName().equals(destinationName))
                     {
                        log.debug(destinationName + " removed.");

                        iter2.remove();
View Full Code Here

    *
    * @see hermes.impl.ConfigDAO#createDestinationConfig()
    */
   public DestinationConfig createDestinationConfig()
   {
      return new DestinationConfig();
   }
View Full Code Here

    * @see hermes.impl.ConfigDAO#createDestinationConfig(java.lang.String,
    *      hermes.Domain)
    */
   public DestinationConfig createDestinationConfig(String name, Domain domain)
   {
      DestinationConfig rval = new DestinationConfig();
      rval.setName(name);
      rval.setDomain(domain.getId());

      return rval;
   }
View Full Code Here

    * @see hermes.impl.ConfigDAO#duplicateForWatch(hermes.config.DestinationConfig,
    *      hermes.Hermes)
    */
   public DestinationConfig duplicateForWatch(DestinationConfig dConfig, Hermes hermes)
   {
      DestinationConfig rval = duplicate(dConfig);
      rval.setSelector(null);
      rval.setMyHermes(hermes.getId());
      return rval;
   }
View Full Code Here

    *
    * @see hermes.impl.ConfigDAO#duplicate(hermes.config.DestinationConfig)
    */
   public DestinationConfig duplicate(DestinationConfig dConfig)
   {
      DestinationConfig rval = new DestinationConfig();

      rval.setName(dConfig.getName());
      rval.setShortName(dConfig.getShortName());
      rval.setSelector(dConfig.getSelector());
      rval.setDomain(dConfig.getDomain());
      rval.setDurable(dConfig.isDurable());
      rval.setClientID(dConfig.getClientID());

      return rval;
   }
View Full Code Here

               if (sConfig.getId().equals(hermesId))
               {
                  for (Iterator iter = factoryConfig.getDestination().iterator(); iter.hasNext();)
                  {
                     DestinationConfig dConfig = (DestinationConfig) iter.next();

                     if (dConfig.getDomain() == Domain.TOPIC.getId() && dConfig.isDurable())
                     {
                        // Don't replace the durable topics....
                     }
                     else
                     {
View Full Code Here

        if (!TextUtils.isEmpty(selector)) {
          if (selectionPath.getLastPathComponent() instanceof DestinationConfigTreeNode) {
            final DestinationConfigTreeNode destinationNode = (DestinationConfigTreeNode) selectionPath.getLastPathComponent();
            final Hermes hermes = ((HermesTreeNode) destinationNode.getHermesTreeNode()).getHermes();

            DestinationConfig newConfig = HermesBrowser.getConfigDAO().duplicate(destinationNode.getConfig());
            newConfig.setSelector(selector);

            log.info("browsing " + hermes.getId() + ": " + destinationNode.getDestinationName() + " with user selector " + selector);

            HermesBrowser.getBrowser().getActionFactory().createQueueBrowseAction(hermes, newConfig);
          } else if (selectionPath.getLastPathComponent() instanceof MessageStoreTreeNode) {
View Full Code Here

          String name = (String) e.nextElement();

          @SuppressWarnings("unchecked")
          Map<String, String> object = (Map<String, String>) mapMsg.getObject(name);

          DestinationConfig dest = HermesBrowser.getConfigDAO().createDestinationConfig();
          dest.setName(object.get("name"));
          dest.setShortName(object.get("name"));
          dest.setDomain("queue".equals(object.get("type")) ? Domain.QUEUE.getId() : ("topic".equals(object.get("type")) ? Domain.TOPIC.getId() : Domain.UNKNOWN.getId()));

          result.add(dest);
        }

        Collections.sort(result, new Comparator<DestinationConfig>() {
View Full Code Here

    final Collection<DestinationConfig> rval = new ArrayList<DestinationConfig>();
    try {
      String[] queues = (String[]) mbsc.getAttribute(new ObjectName(
          "com.sap.default:j2eeType=jms,name=jms_provider/DEFAULT/" + virtualProvider), "QueueNames");
      for (String queue : queues) {
        DestinationConfig config = ConfigHelper.createDestinationConfig(queue, Domain.QUEUE);
        config.setClassName(Queue.class.getName());
        rval.add(config);
      }
      String[] topics = (String[]) mbsc.getAttribute(new ObjectName(
          "com.sap.default:j2eeType=jms,name=jms_provider/DEFAULT/" + virtualProvider), "TopicNames");
      for (String topic : topics) {
        DestinationConfig config = ConfigHelper.createDestinationConfig(topic, Domain.TOPIC);
        config.setClassName(Topic.class.getName());
        rval.add(config);
      }
    } catch (Exception e) {
      throw new HermesException(e);
    }
View Full Code Here

TOP

Related Classes of hermes.config.DestinationConfig

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.