Examples of SystemInfo


Examples of org.rhq.core.system.SystemInfo

        long start = System.currentTimeMillis();
        if (log.isDebugEnabled()) {
            log.debug("About to execute the following process: [" + processExecution + "]");
        }
        SystemInfo systemInfo = serverComponent.getResourceContext().getSystemInformation();
        ProcessExecutionResults results = systemInfo.executeProcess(processExecution);
        logExecutionResults(results);

        if (results.getError() == null) {
            avail = waitForServerToStart(start);
        } else {
View Full Code Here

Examples of org.rhq.core.system.SystemInfo

        processExecution.getEnvironmentVariables().put("NOPAUSE", "1");

        if (log.isDebugEnabled()) {
            log.debug("About to execute the following process: [" + processExecution + "]");
        }
        SystemInfo systemInfo = serverComponent.getResourceContext().getSystemInformation();
        ProcessExecutionResults results = systemInfo.executeProcess(processExecution);
        logExecutionResults(results);

        if (results.getError() != null || (results.getExitCode() != null && results.getExitCode() != 0)) {
            throw new ExecutionFailedException(
                "Error executing shutdown script while stopping AS instance. Shutdown script returned exit code ["
View Full Code Here

Examples of org.rhq.core.system.SystemInfo

        } catch (Exception e) {
            LOG.warn("Failed to canonicalize catalina.base path [" + catalinaBase + "] - cause: " + e);
            // leave as is
        }

        SystemInfo systemInfo = discoveryContext.getSystemInformation();
        String hostname = systemInfo.getHostname();
        String version = UNKNOWN_VERSION;
        String port = UNKNOWN_PORT;
        String address = null;

        // TODO : Should we even allow this remote server stuff? I think we risk a resourceKey collision with a local
View Full Code Here

Examples of org.rhq.core.system.SystemInfo

                    + Arrays.toString(commandLine));
            return null;
        }

        // Pull out data from the discovery call
        SystemInfo systemInfo = context.getSystemInformation();
        String hostname = systemInfo.getHostname();
        TomcatConfig tomcatConfig = parseTomcatConfig(catalinaBase);
        tomcatConfig = applySystemProperties(tomcatConfig, commandLine);

        // Create pieces necessary for the resource creation
        String resourceVersion = determineVersion(catalinaHome, catalinaBase, systemInfo);
View Full Code Here

Examples of org.rhq.core.system.SystemInfo

            component.getResourceContext(), false, profileServiceConnection);

        if (ScriptComponent.TYPE_NAME.equals(resourceType.getName())) {
            String jbossHome = component.getResourceContext().getPluginConfiguration()
                .getSimpleValue(ApplicationServerPluginConfigurationProperties.HOME_DIR, null);
            SystemInfo systemInfo  = component.getResourceContext().getSystemInformation();
            return new ScriptDeployer(jbossHome, systemInfo, downloader);
        } else {
            return new ManagedComponentDeployer(profileServiceConnection, downloader, parentResourceContext);
        }
    }
View Full Code Here

Examples of org.rhq.core.system.SystemInfo

            List<ApacheDirective> directives = tree.search("/ServerRoot");
            if (!directives.isEmpty())
                if (!directives.get(0).getValues().isEmpty())
                    serverRoot = directives.get(0).getValues().get(0);

            SystemInfo systemInfo = this.resourceContext.getSystemInformation();
            if (systemInfo.getOperatingSystemType() != OperatingSystemType.WINDOWS) // UNIX
            {
                // Try some combinations in turn
                executableFile = new File(serverRoot, "bin/httpd");
                if (!executableFile.exists()) {
                    executableFile = new File(serverRoot, "bin/apache2");
View Full Code Here

Examples of org.sd_network.vfs.db.SystemInfo

        if (!file.canRead()) {
            System.out.println("ERROR: the file access denied.");
            return;
        }

        SystemInfo systemInfo = vfsService.getSystemInfo();
        String parentFileID = session.getCurrentDirectory().getID();
        String fileSessionID = null;
        try {
            VfsFile vfsFile = vfsService.createFile(
                    sessionID, parentFileID, cl.getArgs()[1]);

            if (vfsService.isExistsName(
                        sessionID, vfsFile.getID(), cl.getArgs()[1]))
            {
                System.out.println("ERROR: the vfs_file_name already used.");
                return;
            }

            fileSessionID = vfsService.createFileSession(
                    sessionID, vfsFile.getID(), FileSession.Mode.WRITE);

            byte[] buf = new byte[systemInfo.getBytesPerWrite()];
            FileInputStream fis = null;
            try {
                fis = new FileInputStream(file);
                int count = 0;
                while ((count = fis.read(buf)) != -1)
View Full Code Here

Examples of org.serviceconnector.util.SystemInfo

   * @throws XMLStreamException
   *             the xML stream exception
   */
  public void writeSystem(XMLStreamWriter writer) throws XMLStreamException {
    // write system info
    SystemInfo systemInfo = new SystemInfo();
    writer.writeStartElement("system");
    writer.writeStartElement("info");
    this.writeBean(writer, systemInfo);
    writer.writeEndElement(); // close info tag
    // write web info
View Full Code Here

Examples of org.sf.feeling.swt.win32.internal.extension.SYSTEMINFO

   *
   * @return a global SystemInfo instance.
   */
  public static SystemInfo getInstance() {
    if (systemInfo == null) {
      SYSTEMINFO info = Extension.GetSystemInfo();
      systemInfo = new SystemInfo();
      systemInfo.oemId = info.dwOemId;
      systemInfo.pageSize = info.dwPageSize;
      systemInfo.minAppAddress = info.lpMinimumApplicationAddress;
      systemInfo.maxAppAddress = info.lpMaximumApplicationAddress;
View Full Code Here

Examples of weka.core.SystemInfo

          m_SystemInfoFrame = new JFrame(Messages.getInstance().getString("GUIChooser_SystemInfo_JFrame_Text"));
          m_SystemInfoFrame.setIconImage(m_Icon);
          m_SystemInfoFrame.getContentPane().setLayout(new BorderLayout());

          // get info
          Hashtable info = new SystemInfo().getSystemInfo();

          // sort names
          Vector names = new Vector();
          Enumeration enm = info.keys();
          while (enm.hasMoreElements())
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.