Examples of ServiceConfig


Examples of org.apache.helix.provisioning.ServiceConfig

  public void setServiceConfigMap(Map<String, Map<String, Object>> map) {
    _serviceConfigMap = Maps.newHashMap();

    for (String service : map.keySet()) {
      ServiceConfig serviceConfig = new ServiceConfig(Scope.resource(ResourceId.from(service)));
      Map<String, Object> simpleFields = map.get(service);
      for (String key : simpleFields.keySet()) {
        serviceConfig.setSimpleField(key, simpleFields.get(key).toString());
      }
      _serviceConfigMap.put(service, serviceConfig);
    }
  }
View Full Code Here

Examples of org.apache.helix.provisioning.ServiceConfig

    for (String service : applicationSpec.getServices()) {
      String resourceName = service;
      // add the resource with the local provisioner
      ResourceId resourceId = ResourceId.from(resourceName);

      ServiceConfig serviceConfig = applicationSpec.getServiceConfig(resourceName);
      serviceConfig.setSimpleField("service_name", service);
      int numContainers = serviceConfig.getIntField("num_containers", 1);

      YarnProvisionerConfig provisionerConfig = new YarnProvisionerConfig(resourceId);
      provisionerConfig.setNumContainers(numContainers);

      AutoRebalanceModeISBuilder idealStateBuilder = new AutoRebalanceModeISBuilder(resourceId);
View Full Code Here

Examples of org.apache.ode.bpel.pmapi.CommunicationType.ServiceConfig

        super();
        this.replayStartDate = replayStartDate;
    }

    public ServiceConfig getServiceConfig(QName service) {
        ServiceConfig c = servicesConfig.get(service);
        if (c == null) {
            c = ServiceConfig.Factory.newInstance();
            c.setService(service);
            c.addNewReplayType().setMock(XmlAnySimpleType.Factory.newInstance());
            return c;
        } else return c;
    }
View Full Code Here

Examples of org.apache.ode.bpel.pmapi.CommunicationType.ServiceConfig

        public String getAnswersKey(QName service, String operation) {
            return service.toString() + ";" + operation;
        }

        public void add(Exchange e) {
            ServiceConfig cfg = getServiceConfig(e.getService());
            if (cfg.getReplayType().isSetMock()) {
                String key = getAnswersKey(e.getService(), e.getOperation());
                AnswersForKey v = answersMap.get(key);
                if (v == null) {
                    v = new AnswersForKey();
                    answersMap.put(key, v);
View Full Code Here

Examples of org.apache.ode.bpel.pmapi.CommunicationType.ServiceConfig

        }

        public AnswerResult fetchAnswer(QName service, String operation, Element outgoingMessage, Date currentEventDateTime) {
            __log.debug("fetching answer for " + service + " " + operation);

            ServiceConfig cfg = getServiceConfig(service);

            if (cfg.getReplayType().isSetMock()) {
                String key = getAnswersKey(service, operation);
                AnswersForKey v = answersMap.get(key);
                Exchange e = v == null ? null : v.answerPos < v.answers.size() ? v.answers.get(v.answerPos) : null;
                if (e == null) {
                    throw new IllegalStateException("answer for " + service + " " + operation + " at time " + currentEventDateTime + " not found, outgoing message was " + DOMUtils.domToString(outgoingMessage));
                }
                v.answerPos++;
                __log.debug("fetched " + e);
                return new AnswerResult(false, e);
            } else if (cfg.getReplayType().isSetMockQuery()) {
                return new AnswerResult(false, fetchMockQuery(service, operation, outgoingMessage, cfg));
            } else if (cfg.getReplayType().isSetLive()) {
                return new AnswerResult(true, null);
            } else assert(false);
            return null;
        }
View Full Code Here

Examples of org.drools.guvnor.client.asseteditor.drools.serviceconfig.ServiceConfig

        buildWar(null, (Map<String, File>) null, null);
    }

    @Test(expected = NullPointerException.class)
    public void testNullPointer2() throws IOException {
        buildWar(new ServiceConfig(REST_SERVICE_CONFIG), (Map<String, File>) null, null);
    }
View Full Code Here

Examples of org.dspace.servicemanager.ServiceConfig

                    map = serviceNameConfigs.get(beanName);
                } else {
                    map = new HashMap<String, ServiceConfig>();
                    serviceNameConfigs.put(beanName, map);
                }
                map.put(beanName, new ServiceConfig(dsConfig));
            }
        }
        return serviceNameConfigs;
    }
View Full Code Here

Examples of org.hyperic.sigar.win32.ServiceConfig

                    Service s = null;

                    try {
                        s = new Service(serviceName);

                        ServiceConfig sc = s.getConfig();
                        ServiceInfo si = new ServiceInfo(sc.getName(), sc.getDisplayName(), sc.getDescription(), sc
                            .getPath(), sc.getDependencies());
                        services.add(si);
                    } catch (Win32Exception e) {
                        ; // Ignore these, it means Sigar was rejected by Windows for the particular Service.
                    } finally {
                        if (null != s) {
View Full Code Here

Examples of org.hyperic.sigar.win32.ServiceConfig

    public void testServiceCreateDelete() throws Exception {
        if (!TEST_CREATE) {
            return;
        }
        ServiceConfig config = new ServiceConfig(TEST_NAME);
        config.setStartType(ServiceConfig.START_MANUAL);
        config.setDisplayName("My Test Service");
        config.setDescription("A Description of " + config.getDisplayName());
        config.setPath("C:\\Program Files\\My Test 1.0\\mytest.exe");

        Service.create(config);
    }
View Full Code Here

Examples of org.hyperic.sigar.win32.ServiceConfig

    public void testServiceCreateDelete() throws Exception {
        if (!TEST_CREATE) {
            return;
        }
        ServiceConfig config = new ServiceConfig(TEST_NAME);
        config.setStartType(ServiceConfig.START_MANUAL);
        config.setDisplayName("My Test Service");
        config.setDescription("A Description of " + config.getDisplayName());
        config.setPath("C:\\Program Files\\My Test 1.0\\mytest.exe");

        Service.create(config);
    }
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.