Package uk.ac.bbsrc.tgac.miso.core.service.integration.strategy

Examples of uk.ac.bbsrc.tgac.miso.core.service.integration.strategy.NotificationConsumerStrategy


  @Override
  public Set<NotificationGateway> getGatewaysFor(PlatformType pt) {
    Set<NotificationGateway> gateways = new HashSet<NotificationGateway>();

    for (String str : this.proxyMap.keySet()) {
      NotificationConsumerStrategy ncs = getNotificationConsumerService().getConsumerStrategy(str);
      if (ncs.isStrategyFor(pt)) {
        GatewayProxyFactoryBean gateway = this.proxyMap.get(str);
        if (gateway.isRunning()) {
          try {
            NotificationGateway s = (NotificationGateway)gateway.getObject();
            gateways.add(s);
View Full Code Here


      ServiceLoader<NotificationConsumerStrategy> consumerLoader = ServiceLoader.load(NotificationConsumerStrategy.class);
      Iterator<NotificationConsumerStrategy> consumerIterator = consumerLoader.iterator();

      strategyMap = new HashMap<String, NotificationConsumerStrategy>();
      while (consumerIterator.hasNext()) {
        NotificationConsumerStrategy p = consumerIterator.next();

        if (!strategyMap.containsKey(p.getName())) {
          strategyMap.put(p.getName(), p);
        }
        else {
          if (strategyMap.get(p.getName()) != p) {
            String msg = "Multiple different NotificationConsumerStrategies with the same strategy name " +
                         "('" + p.getName() + "') are present on the classpath. Strategy names must be unique.";
            log.error(msg);
            throw new ServiceConfigurationError(msg);
          }
        }
      }
View Full Code Here

TOP

Related Classes of uk.ac.bbsrc.tgac.miso.core.service.integration.strategy.NotificationConsumerStrategy

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.