Examples of HostConfig


Examples of com.caucho.server.host.HostConfig

        port.bindTo(_server);
      }

      _resin.start();
     
      HostConfig hostConfig = new HostConfig();
      _server.addHost(hostConfig);
      _host = _server.getHost("", 0);

      if (_host == null) {
        throw new ConfigException(L.l("ResinEmbed requires a <host> to be configured in the resin.xml, because the webapps must belong to a host."));
View Full Code Here

Examples of com.caucho.server.host.HostConfig

      if (_httpPort >= 0) {
        HttpEmbed httpEmbed = new HttpEmbed(_httpPort);
        httpEmbed.bindTo(_server);
      }
     
      HostConfig hostConfig = new HostConfig();
      _server.addHost(hostConfig);
      _host = _server.getHost("", 0);
    } catch (RuntimeException e) {
      throw e;
    } catch (Throwable e) {
View Full Code Here

Examples of com.caucho.server.host.HostConfig

    Thread thread = Thread.currentThread();
    ClassLoader oldLoader = thread.getContextClassLoader();

    try {
      HostConfig hostConfig = new HostConfig();
      hostConfig.setHostName(new RawString(_hostName));
      hostConfig.setRootDirectory(new RawString("memory:/error/" + _hostName));
      hostConfig.setSkipDefaultConfig(true);
      hostConfig.setRedeployMode(DeployMode.MANUAL);

      WebAppConfig webAppConfig = new WebAppConfig();
      webAppConfig.setId("/");
      webAppConfig.setRootDirectory(new RawString("memory:/error/ROOT"));
      webAppConfig.setSkipDefaultConfig(true);
      webAppConfig.setRedeployMode(DeployMode.MANUAL);

      hostConfig.addPropertyProgram("web-app", webAppConfig);

      // host.addWebApp(webAppConfig);
     
      ServletMapping mapping = new ServletMapping();
      mapping.addURLPattern("/hmtp");
View Full Code Here

Examples of com.caucho.server.host.HostConfig

  }

  public HostConfig getHostConfig()
  {
    if (_hostConfig == null) {
      HostConfig hostConfig = new HostConfig();
      hostConfig.setId(HOST_NAME);
      /*
      if (_path != null) {
        hostConfig.setRootDirectory(new RawString(_path.getFullPath() + "/bogus-admin"));
      }
      else
        hostConfig.setRootDirectory(new RawString("/bogus-admin"));
      */
      hostConfig.setRootDirectory(new RawString("/bogus-admin"));

      hostConfig.setSkipDefaultConfig(true);

      hostConfig.init();

      try {
        if (_server == null)
          _server = _resin.getServer();

View Full Code Here

Examples of com.caucho.server.host.HostConfig

    if (_password == null) {
      log.warning(L.l("jmx-remote disabled.  jmx-remote requires at least one enabled management <user>"));
      return;
    }
   
    HostConfig hostConfig = _management.getHostConfig();

    WebAppConfig webAppConfig = new WebAppConfig();
    webAppConfig.setId(_serviceName);
    webAppConfig.setRootDirectory(new RawString("memory:/admin-dummy-root"));

    hostConfig.addBuilderProgram(new PropertyValueProgram("web-app", webAppConfig));

    ServletMapping servlet = new ServletMapping();

    servlet.setServletName(_serviceName);
    servlet.addURLPattern("/*");
 
View Full Code Here

Examples of com.google.gwt.thirdparty.org.apache.catalina.startup.HostConfig

    String appBase = catBase + "/webapps";
    catHost = (StandardHost) catEmbedded.createHost("localhost", appBase);

    // Hook up a host config to search for and pull in webapps.
    //
    HostConfig hostConfig = new HostConfig();
    catHost.addLifecycleListener(hostConfig);

    // Hook pre-install events so that we can add attributes to allow loaded
    // instances to find their development instance host.
    //
View Full Code Here

Examples of com.nirima.docker.client.model.HostConfig

        ContainerCreateResponse container = dockerClient.containers().create(containerConfig);

        // Launch it.. :

        HostConfig hostConfig = createHostConfig();

        dockerClient.container(container.getId()).start(hostConfig);

        String containerId = container.getId();
View Full Code Here

Examples of com.spotify.docker.client.messages.HostConfig

    final ContainerCreation container = docker.createContainer(containerConfig, name);
    log.info("created container: {}: {}, {}", config, container, containerConfig);
    listener.created(container.id());

    // Start container
    final HostConfig hostConfig = config.hostConfig();
    log.info("starting container: {}: {} {}", config, container.id(), hostConfig);
    listener.starting();
    docker.startContainer(container.id(), hostConfig);
    log.info("started container: {}: {}", config, container.id());
    listener.started();
View Full Code Here

Examples of io.fabric8.docker.api.container.HostConfig

        }
    }

    protected void startDockerContainer(String id, CreateDockerContainerOptions options) {
        if (!Strings.isNullOrBlank(id)) {
            HostConfig hostConfig = new HostConfig();

            Map<String, Integer> externalPorts = options.getExternalPorts();
            Map<String, Integer> internalPorts = options.getInternalPorts();

            SortedMap<Integer, List<Map<String, String>>> sortedPortsToBinding = new TreeMap<>();
            for (Map.Entry<String, Integer> entry : internalPorts.entrySet()) {
                String portName = entry.getKey();
                Integer internalPort = entry.getValue();
                Integer externalPort = externalPorts.get(portName);
                if (internalPort != null && externalPort != null) {
                    sortedPortsToBinding.put(internalPort, createNewPortConfig(externalPort));
                }
            }

            // now lets add the bindings in port order
            Map<String, List<Map<String, String>>> portBindings = new LinkedHashMap<>();
            for (Map.Entry<Integer, List<Map<String, String>>> entry : sortedPortsToBinding.entrySet()) {
                Integer internalPort = entry.getKey();
                List<Map<String, String>> value = entry.getValue();
                portBindings.put("" + internalPort + "/tcp", value);
            }

            hostConfig.setPortBindings(portBindings);
            LOG.info("starting container " + id + " with " + hostConfig);
            try {
                docker.containerStart(id, hostConfig);
            } catch (Exception e) {
                LOG.error("Failed to start container " + id + " with " + hostConfig + " " + e + Dockers.dockerErrorMessage(e), e);
View Full Code Here

Examples of org.apache.ambari.server.state.HostConfig

          Map<String, String> values = new HashMap<String, String>(entry.getValue());

          String tag = values.get(ConfigHelper.CLUSTER_DEFAULT_TAG);
          values.remove(ConfigHelper.CLUSTER_DEFAULT_TAG);

          HostConfig hc = new HostConfig();
          hc.setDefaultVersionTag(tag);
          actualConfigs.put(type, hc);

          if (!values.isEmpty()) {
            for (Entry<String, String> overrideEntry : values.entrySet()) {
              Long groupId = Long.parseLong(overrideEntry.getKey());
              hc.getConfigGroupOverrides().put(groupId, overrideEntry.getValue());
              if (!configGroupMap.containsKey(groupId)) {
                LOG.debug("Config group does not exist, id = " + groupId);
              }
            }
          }
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.