Package org.rhq.core.system.pquery

Examples of org.rhq.core.system.pquery.ProcessInfoQuery


        SystemInfo systemInfo = SystemInfoFactory.createSystemInfo();

        try {
            Set<ProcessScan> processScans = this.resource.getResourceType().getProcessScans();
            if (processScans != null && !processScans.isEmpty()) {
                ProcessInfoQuery piq = new ProcessInfoQuery(systemInfo.getAllProcesses());
                for (ProcessScan processScan : processScans) {
                    List<ProcessInfo> queryResults = piq.query(processScan.getQuery());
                    if ((queryResults != null) && (queryResults.size() > 0)) {
                        for (ProcessInfo autoDiscoveredProcess : queryResults) {
                            scanResults.add(new ProcessScanResult(processScan, autoDiscoveredProcess));
                        }
                    }
View Full Code Here


        return processes;
    }

    public List<ProcessInfo> getProcesses(String piq) {
        ProcessInfoQuery piql = new ProcessInfoQuery(getAllProcesses());
        return piql.query(piq);
    }
View Full Code Here

        }

        try {
            SystemInfo info = SystemInfoFactory.createSystemInfo();
            List<ProcessInfo> processes = info.getAllProcesses();
            ProcessInfoQuery query = new ProcessInfoQuery(processes);
            List<ProcessInfo> results = query.query(piql);

            out.println(MSG.getMsg(AgentI18NResourceKeys.PIQL_RESULTS_HEADER, piql));

            for (ProcessInfo process : results) {
                if (verbose) {
View Full Code Here

            SystemInfo systemInfo = SystemInfoFactory.createSystemInfo();

            Set<ProcessScan> processScans = resourceType.getProcessScans();
            if ((processScans != null) && (processScans.size() > 0)) {
                try {
                    ProcessInfoQuery piq = new ProcessInfoQuery(systemInfo.getAllProcesses());
                    if (processScans != null) {
                        for (ProcessScan processScan : processScans) {
                            List<ProcessInfo> queryResults = piq.query(processScan.getQuery());
                            if ((queryResults != null) && (queryResults.size() > 0)) {
                                for (ProcessInfo autoDiscoveredProcess : queryResults) {
                                    scanResults.add(new ProcessScanResult(processScan, autoDiscoveredProcess));
                                    out.println(MSG.getMsg(AgentI18NResourceKeys.DISCOVERY_PROCESS_SCAN, resourceType
                                        .getPlugin(), resourceType.getName(), processScan, autoDiscoveredProcess));
View Full Code Here

            return Collections.emptyList();
        List<ProcessScanResult> scanResults = new ArrayList<ProcessScanResult>();
        Set<ProcessScan> processScans = serverType.getProcessScans();
        if (processScans != null && !processScans.isEmpty()) {
            log.debug("Executing process scans for server type " + serverType + "...");
            ProcessInfoQuery piq = new ProcessInfoQuery(processInfos);
            for (ProcessScan processScan : processScans) {
                List<ProcessInfo> queryResults = piq.query(processScan.getQuery());
                if ((queryResults != null) && (queryResults.size() > 0)) {
                    for (ProcessInfo autoDiscoveredProcess : queryResults) {
                        scanResults.add(new ProcessScanResult(processScan, autoDiscoveredProcess));
                        if (log.isDebugEnabled()) {
                            log.debug("Process scan auto-detected potential new server Resource: scan=[" + processScan
View Full Code Here

    private List<ProcessScanResult> scanProcesses(SystemInfo systemInfo) {
        List<ProcessScanResult> scanResults = new ArrayList<ProcessScanResult>();
        Set<ProcessScan> processScans = apacheServerResourceType.getProcessScans();
        if (processScans != null && !processScans.isEmpty()) {
            ProcessInfoQuery piq = new ProcessInfoQuery(systemInfo.getAllProcesses());
            for (ProcessScan processScan : processScans) {
                List<ProcessInfo> queryResults = piq.query(processScan.getQuery());
                if ((queryResults != null) && (queryResults.size() > 0)) {
                    for (ProcessInfo autoDiscoveredProcess : queryResults) {
                        scanResults.add(new ProcessScanResult(processScan, autoDiscoveredProcess));
                    }
                }
View Full Code Here

    private List<ProcessScanResult> performProcessScans(ResourceType serverType) {
        List<ProcessScanResult> scanResults = new ArrayList<ProcessScanResult>();
        Set<ProcessScan> processScans = serverType.getProcessScans();
        log.debug("Executing process scans for server type " + serverType + "...");
        ProcessInfoQuery piq = new ProcessInfoQuery(processInfo);
        for (ProcessScan processScan : processScans) {
            List<ProcessInfo> queryResults = piq.query(processScan.getQuery());
            for (ProcessInfo autoDiscoveredProcess : queryResults) {
                scanResults.add(new ProcessScanResult(processScan, autoDiscoveredProcess));
                log.info("Process scan auto-detected new server resource: scan=[" + processScan
                        + "], discovered-process=[" + autoDiscoveredProcess + "]");
            }
View Full Code Here

    private List<ProcessScanResult> performProcessScans(ResourceType serverType) {
        List<ProcessScanResult> scanResults = new ArrayList<ProcessScanResult>();
        Set<ProcessScan> processScans = serverType.getProcessScans();
        log.debug("Executing process scans for server type " + serverType + "...");
        ProcessInfoQuery piq = new ProcessInfoQuery(processInfo);
        for (ProcessScan processScan : processScans) {
            List<ProcessInfo> queryResults = piq.query(processScan.getQuery());
            for (ProcessInfo autoDiscoveredProcess : queryResults) {
                scanResults.add(new ProcessScanResult(processScan, autoDiscoveredProcess));
                log.info("Process scan auto-detected new server resource: scan=[" + processScan
                        + "], discovered-process=[" + autoDiscoveredProcess + "]");
            }
View Full Code Here

TOP

Related Classes of org.rhq.core.system.pquery.ProcessInfoQuery

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.