Examples of ReadResource


Examples of org.rhq.modules.plugins.jbossas7.json.ReadResource

     * @param address
     */
    private void addDiscoveredResource(ResourceDiscoveryContext context, Set<DiscoveredResourceDetails> details,
        ASConnection connection, String path, String name, Address address) {
        //ping the resource to determine if it's enabled and available.
        ReadResource op = new ReadResource(address);
        Result result = connection.execute(op);
        if (result.isSuccess()) {

            //include the config entry for the discovered node.
            Configuration config2 = context.getDefaultPluginConfiguration();
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.json.ReadResource

    }

    private void collectServerKindTraits(MeasurementReport report, Set<MeasurementScheduleRequest> skmRequests) {
        Address address = new Address();

        ReadResource op = new ReadResource(address);
        op.includeRuntime(true);

        ComplexResult res = getASConnection().executeComplex(op);
        if (res.isSuccess()) {
            Map<String, Object> props = res.getResult();
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.json.ReadResource

        } else {
            // Single subsystem
            path += "," + confPath;
            if (path.startsWith(","))
                path = path.substring(1);
            Result result = connection.execute(new ReadResource(new Address(path)));
            if (result.isSuccess()) {

                String resKey = path;
                String name = resKey.substring(resKey.lastIndexOf("=") + 1);
                Configuration config2 = context.getDefaultPluginConfiguration();
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.json.ReadResource

    }

    private File findLogDirForManagedDeployment() {
        Address logDirAddress = new Address(findManagedASServerComponent().getServerAddress());
        logDirAddress.add("path", "jboss.server.log.dir");
        ReadResource readResource = new ReadResource(logDirAddress);
        Result result = getASConnection().execute(readResource);
        if (result.isSuccess()) {
            @SuppressWarnings("unchecked")
            Map<String, Object> resultData = (Map<String, Object>) result.getResult();
            String dir = resultData.get("path").toString();
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.json.ReadResource

        Address managedServerDeploymentAddress = new Address();
        managedServerDeploymentAddress.add("host", "master");
        managedServerDeploymentAddress.add("server", "server-one");
        managedServerDeploymentAddress.add("deployment", "javaee6-test-app.war");
        Result readAttributeResult = getDomainControllerASConnection().execute(
            new ReadResource(managedServerDeploymentAddress));

        assertTrue(readAttributeResult.isSuccess(), readAttributeResult.getFailureDescription());

        @SuppressWarnings("unchecked")
        Map<String, ?> attributes = (Map<String, ?>) readAttributeResult.getResult();
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.json.ReadResource

            return;
        }

        // So we have an AS7/EAP6
        Address scanner = new Address("subsystem=deployment-scanner,scanner=default");
        ReadResource op = new ReadResource(scanner);
        Result res = getASConnection().execute(op);
        if (res.isSuccess()) {
            @SuppressWarnings("unchecked")
            Map<String, String> scannerMap = (Map<String, String>) res.getResult();
            String path = scannerMap.get("path");
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.json.ReadResource

    }

    private File resolveRelativePath(String relativeTo) {

        Address addr = new Address("path", relativeTo);
        ReadResource op = new ReadResource(addr);
        Result res = getASConnection().execute(op);
        if (res.isSuccess()) {
            @SuppressWarnings("unchecked")
            Map<String, String> pathMap = (Map<String, String>) res.getResult();
            String path = pathMap.get("path");
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.json.ReadResource

        assertTrue(response.isSuccess(), getFailureMessage(response));

        Address deploymentAddress = new Address();
        deploymentAddress.add("deployment", "javaee6-test-app.war");
        Result readAttributeResult = getStandaloneASConnection().execute(new ReadResource(deploymentAddress));

        assertTrue(readAttributeResult.isSuccess(), readAttributeResult.getFailureDescription());

        @SuppressWarnings("unchecked")
        Map<String, ?> attributes = (Map<String, ?>) readAttributeResult.getResult();
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.json.ReadResource

        if (path.startsWith(","))
            path = path.substring(1);
        PropertySimple ps = new PropertySimple("path", path);

        //discover the node if it's available.
        Result result = connection.execute(new ReadResource(new Address(path)));
        if (result.isSuccess()) {

            String resKey = path;
            //strip off subsystem
            String name = resKey.substring(resKey.lastIndexOf("=") + 1);
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.json.ReadResource

            // Create batch operation to read N query-cache nodes
            CompositeOperation batchOperation = new CompositeOperation();
            for (String childrenName : childrenNamesSubList) {
                Address address = new Address(getAddress());
                address.add("query-cache", childrenName);
                ReadResource readQueryCacheResource = new ReadResource(address);
                readQueryCacheResource.includeRuntime(true);
                batchOperation.addStep(readQueryCacheResource);
            }

            // Execute batch
            Result batchResult = getASConnection().execute(batchOperation, timeoutSec);
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.