Examples of EnvironmentInformation


Examples of com.sun.enterprise.registration.impl.environment.EnvironmentInformation

    }


    private String  getEnvironmentInformation() throws RegistrationException {
        StringBuilder html = new StringBuilder();
        EnvironmentInformation se = new EnvironmentInformation();

        Formatter fmt = new Formatter(html);

        html.append("<environment>");
        fmt.format("<hostname>%s</hostname>", se.getHostname());
        fmt.format("<hostId>%s</hostId>",se.getHostId());
        fmt.format("<osName>%s</osName>",se.getOsName());
        fmt.format("<osVersion>%s</osVersion>",se.getOsVersion());
        fmt.format("<osArchitecture>%s</osArchitecture>",se.getOsArchitecture());
        fmt.format("<systemModel>%s</systemModel>",se.getSystemModel());
        fmt.format("<systemManufacturer>%s</systemManufacturer>",se.getSystemManufacturer());
        fmt.format("<cpuManufacturer>%s</cpuManufacturer>",se.getCpuManufacturer());
        fmt.format("<serialNumber>%s</serialNumber>",se.getSerialNumber());

        addNumericTag(fmt, "physmem", se.getPhysMem());
        html.append("<cpuinfo>");
        addNumericTag(fmt, "sockets", se.getSockets());
        addNumericTag(fmt, "cores", se.getCores());
        addNumericTag(fmt, "virtcpus", se.getVirtCpus());
        fmt.format("<name>%s</name>", se.getCpuName());
        addNumericTag(fmt, "clockrate", se.getClockRate());
        html.append("</cpuinfo>");
        html.append("</environment>");
        return html.toString();
    }
View Full Code Here

Examples of com.sun.enterprise.registration.impl.environment.EnvironmentInformation

    }


    private String  getEnvironmentInformation() throws RegistrationException {
        StringBuilder html = new StringBuilder();
        EnvironmentInformation se = new EnvironmentInformation();

        Formatter fmt = new Formatter(html);

        html.append("<environment>");
        fmt.format("<hostname>%s</hostname>", se.getHostname());
        fmt.format("<hostId>%s</hostId>",se.getHostId());
        fmt.format("<osName>%s</osName>",se.getOsName());
        fmt.format("<osVersion>%s</osVersion>",se.getOsVersion());
        fmt.format("<osArchitecture>%s</osArchitecture>",se.getOsArchitecture());
        fmt.format("<systemModel>%s</systemModel>",se.getSystemModel());
        fmt.format("<systemManufacturer>%s</systemManufacturer>",se.getSystemManufacturer());
        fmt.format("<cpuManufacturer>%s</cpuManufacturer>",se.getCpuManufacturer());
        fmt.format("<serialNumber>%s</serialNumber>",se.getSerialNumber());

        addNumericTag(fmt, "physmem", se.getPhysMem());
        html.append("<cpuinfo>");
        addNumericTag(fmt, "sockets", se.getSockets());
        addNumericTag(fmt, "cores", se.getCores());
        addNumericTag(fmt, "virtcpus", se.getVirtCpus());
        fmt.format("<name>%s</name>", se.getCpuName());
        addNumericTag(fmt, "clockrate", se.getClockRate());
        html.append("</cpuinfo>");
        html.append("</environment>");
        return html.toString();
    }
View Full Code Here

Examples of com.sun.enterprise.registration.impl.environment.EnvironmentInformation

    }


    private String  getEnvironmentInformation() throws RegistrationException {
        StringBuilder html = new StringBuilder();
        EnvironmentInformation se = new EnvironmentInformation();

        Formatter fmt = new Formatter(html);

        html.append("<environment>");
        fmt.format("<hostname>%s</hostname>", se.getHostname());
        fmt.format("<hostId>%s</hostId>",se.getHostId());
        fmt.format("<osName>%s</osName>",se.getOsName());
        fmt.format("<osVersion>%s</osVersion>",se.getOsVersion());
        fmt.format("<osArchitecture>%s</osArchitecture>",se.getOsArchitecture());
        fmt.format("<systemModel>%s</systemModel>",se.getSystemModel());
        fmt.format("<systemManufacturer>%s</systemManufacturer>",se.getSystemManufacturer());
        fmt.format("<cpuManufacturer>%s</cpuManufacturer>",se.getCpuManufacturer());
        fmt.format("<serialNumber>%s</serialNumber>",se.getSerialNumber());

        addNumericTag(fmt, "physmem", se.getPhysMem());
        html.append("<cpuinfo>");
        addNumericTag(fmt, "sockets", se.getSockets());
        addNumericTag(fmt, "cores", se.getCores());
        addNumericTag(fmt, "virtcpus", se.getVirtCpus());
        fmt.format("<name>%s</name>", se.getCpuName());
        addNumericTag(fmt, "clockrate", se.getClockRate());
        html.append("</cpuinfo>");
        html.append("</environment>");
        return html.toString();
    }
View Full Code Here

Examples of com.sun.enterprise.registration.impl.environment.EnvironmentInformation

    }


    private String  getEnvironmentInformation() throws RegistrationException {
        StringBuilder html = new StringBuilder();
        EnvironmentInformation se = new EnvironmentInformation();

        Formatter fmt = new Formatter(html);

        html.append("<environment>");
        fmt.format("<hostname>%s</hostname>\r\n", se.getHostname());
        fmt.format("<hostId>%s</hostId>\r\n",se.getHostId());
        fmt.format("<osName>%s</osName>\r\n",se.getOsName());
        fmt.format("<osVersion>%s</osVersion>\r\n",se.getOsVersion());
        fmt.format("<osArchitecture>%s</osArchitecture>\r\n",se.getOsArchitecture());
        fmt.format("<systemModel>%s</systemModel>\r\n",se.getSystemModel());
        fmt.format("<systemManufacturer>%s</systemManufacturer>\r\n",se.getSystemManufacturer());
        fmt.format("<cpuManufacturer>%s</cpuManufacturer>\r\n",se.getCpuManufacturer());
        fmt.format("<serialNumber>%s</serialNumber>\r\n",se.getSerialNumber());

        addNumericTag(fmt, "physmem", se.getPhysMem());
        html.append("<cpuinfo>\r\n");
        addNumericTag(fmt, "sockets", se.getSockets());
        addNumericTag(fmt, "cores", se.getCores());
        addNumericTag(fmt, "virtcpus", se.getVirtCpus());
        fmt.format("<name>%s</name>\r\n", se.getCpuName());
        addNumericTag(fmt, "clockrate", se.getClockRate());
        html.append("</cpuinfo>\r\n");
        html.append("</environment>\r\n");
        return html.toString();
    }
View Full Code Here

Examples of com.sun.scn.servicetags.EnvironmentInformation

            try {
                hostName = InetAddress.getLocalHost().getHostName();
            } catch(Exception ex) {
                logger.log(Level.WARNING, ex.getMessage());
            }
            EnvironmentInformation env = new EnvironmentInformation(
                    hostName, "", // hostID
                    System.getProperty("os.name"),
                    System.getProperty("os.version"),
                    System.getProperty("os.arch"),
                    "", //systemModel
View Full Code Here

Examples of org.sonar.batch.bootstrapper.EnvironmentInformation

    createBatch(sonarVersion, properties, extensions).execute();
  }

  Batch createBatch(String sonarVersion, Properties properties, List<Object> extensions) {
    initLogging(properties);
    EnvironmentInformation env = new EnvironmentInformation(properties.getProperty("sonarRunner.app"), properties.getProperty("sonarRunner.appVersion"));
    return Batch.builder()
      .setEnvironment(env)
      .addComponents(extensions)
      .setBootstrapProperties((Map) properties)
      .build();
View Full Code Here

Examples of org.sonar.batch.bootstrapper.EnvironmentInformation

  private BatchMediumTester(BatchMediumTesterBuilder builder) {
    batch = Batch.builder()
      .setEnableLoggingConfiguration(true)
      .addComponents(
        new EnvironmentInformation("mediumTest", "1.0"),
        builder.pluginsReferential,
        builder.globalRefProvider,
        builder.projectRefProvider,
        new DefaultDebtModel())
      .setBootstrapProperties(builder.bootstrapProperties)
View Full Code Here

Examples of org.sonar.batch.bootstrapper.EnvironmentInformation

    }
    return ProjectReactorBuilder.class;
  }

  private boolean isRunnerVersionLessThan2Dot4() {
    EnvironmentInformation env = this.getComponentByType(EnvironmentInformation.class);
    // Starting from SQ Runner 2.4 the key is "SonarQubeRunner"
    return env != null && "SonarRunner".equals(env.getKey());
  }
View Full Code Here

Examples of org.sonar.batch.bootstrapper.EnvironmentInformation

    assertThat(ExtensionUtils.isBatchExtension(new ServerService())).isFalse();
  }

  @Test
  public void shouldCheckEnvironment() {
    assertThat(ExtensionUtils.supportsEnvironment(new MavenService(), new EnvironmentInformation("maven", "2.2.1"))).isTrue();
    assertThat(ExtensionUtils.supportsEnvironment(new BuildToolService(), new EnvironmentInformation("maven", "2.2.1"))).isTrue();
    assertThat(ExtensionUtils.supportsEnvironment(new DefaultService(), new EnvironmentInformation("maven", "2.2.1"))).isTrue();

    assertThat(ExtensionUtils.supportsEnvironment(new BuildToolService(), new EnvironmentInformation("eclipse", "0.1"))).isFalse();
  }
View Full Code Here

Examples of org.sonar.batch.bootstrapper.EnvironmentInformation

  @Test
  public void should_filter_extensions_to_install() {
    BatchPluginRepository pluginRepository = mock(BatchPluginRepository.class);
    when(pluginRepository.getPluginsByMetadata()).thenReturn(newPlugin(Foo.class, Bar.class));
    ComponentContainer container = new ComponentContainer();
    ExtensionInstaller installer = new ExtensionInstaller(pluginRepository, new EnvironmentInformation("ant", "1.7"), mode);
    installer.install(container, new FooMatcher());

    assertThat(container.getComponentByType(Foo.class)).isNotNull();
    assertThat(container.getComponentByType(Bar.class)).isNull();
  }
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.