Package org.rhq.modules.plugins.jbossas7.json

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


        if ((parentConfPath != null) && (!parentConfPath.isEmpty())) {
            path = parentConfPath + "," + confPath;//Ex. profile=standalone-ha,subsystem=security
        }

        String name;//name=security
        Address address = new Address(path);

        //process the specific nodes
        //Then we need to find out which of subchildren of ModOpsComponent is used i)security-domain=*
        //ii)[Authentication*,etc] or iii)[ModOptions]

        //path should already be right
        if (path.endsWith("security-domain")) {//individual security domain entries
            //ex. path => /subsystem=security/security-domain=(entry name)
            //find all children and iterate over and update name appropriately
            Address typeAddress = new Address(path);
            String childType = "security-domain";
            Result result = connection.execute(new ReadChildrenNames(typeAddress, childType));

            if (result.isSuccess()) {

                @SuppressWarnings("unchecked")
                List<String> children = (List<String>) result.getResult();
                for (String child : children) {
                    //update the components for discovery
                    name = child;//ex. basic, databaseDomain
                    String currentChildPath = path + //ex. /subsystem=security,security-domain=jboss-web
                        "=" + child;
                    address = new Address(currentChildPath);
                    addDiscoveredResource(context, details, connection, currentChildPath, name, address);
                }
            }
        } else if (ifResourceIsSupportedModuleType(path)) {//is ModOptions map child
            //ex. path => /subsystem=security/security-domain=(entry name)/authentication=classic/login-modules
            //Ex. String attribute = "login-modules";
            String attribute = lookupAttributeType(path);
            //query all the module-options defined and discover them here
            //Ex. String typeAddress = "subsystem=security,security-domain=testDomain2,authentication=classic";
            String typeAddress = parentConfPath;
            ReadAttribute readModuleOptionType = new ReadAttribute(new Address(typeAddress), attribute);
            Result result = connection.execute(readModuleOptionType);
            if (result.isSuccess()) {
                List<Value> loadedLoginModuleTypes = ModuleOptionsComponent.populateSecurityDomainModuleOptions(result,
                    ModuleOptionsComponent.loadModuleOptionType(attribute));
                for (int moduleIndex = 0; moduleIndex < loadedLoginModuleTypes.size(); moduleIndex++) {
View Full Code Here


    }

    protected boolean waitUntilDown() throws InterruptedException {
        boolean notAnswering = false;
        while (!notAnswering) {
            Operation op = new ReadAttribute(new Address(), "release-version");

            try {
                Result res = getASConnection().execute(op);
                if (!res.isSuccess()) { // If op succeeds, server is not down
                    notAnswering = true;
View Full Code Here

    }

    private boolean waitForServerToStart() throws InterruptedException {
        boolean up = false;
        while (!up) {
            Operation op = new ReadAttribute(new Address(), "release-version");
            try {
                Result res = getASConnection().execute(op);
                if (res.isSuccess()) { // If op succeeds, server is not down
                    up = true;
                }
View Full Code Here

    /**
     * The release version as returned by the "release-version" attribute of the root node in the management model.
     */
    public String getReleaseVersion() {
        if (releaseVersion == null) {
            releaseVersion = (String) getASConnection().execute(new ReadAttribute(new Address(), "release-version"))
                .getResult();
        }

        return releaseVersion;
    }
View Full Code Here

        return releaseVersion;
    }

    private void collectStartTimeTrait(MeasurementReport report, MeasurementScheduleRequest request) {
        Address address = new Address(getHostAddress());
        address.add("core-service", "platform-mbean");
        address.add("type", "runtime");
        Long startTime;
        try {
            startTime = readAttribute(address, "start-time", Long.class);
        } catch (Exception e) {
            startTime = null;
View Full Code Here

     * Reads local-host-name attribute
     *
     * @return name current host within EAP domain or null if we failed to read it
     */
    public static String findASDomainHostName(ASConnection connection) {
        ReadAttribute op = new ReadAttribute(new Address(), "local-host-name");
        op.includeDefaults(true);
        Result result = connection.execute(op);
        if (result.isSuccess()) {
            return result.getResult().toString();
        }
View Full Code Here

        }
        return hostConfig;
    }

    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);
View Full Code Here

      for (MeasurementScheduleRequest request: requests) {
         if (request.getName().equals("startTime")) {
            String path = getPath();
            path = path.replace("server-config","server");
            Address address = new Address(path);
            address.add("core-service","platform-mbean");
            address.add("type","runtime");
            Operation op = new ReadAttribute(address,"start-time");
            Result res = getASConnection().execute(op);

            if (res.isSuccess()) {
               Long startTime= (Long) res.getResult();
View Full Code Here

    public  void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> metrics) throws Exception {

         for (MeasurementScheduleRequest req : metrics) {
            if (req.getName().equals("appuid")) {

                Address addr = new Address("core-service=platform-mbean,type=runtime");
                ReadAttribute op = new ReadAttribute(addr,"system-properties");
                ASConnection conn = parent.getASConnection();
                ComplexResult result = conn.executeComplex(op);

                if (result.isSuccess()) {
View Full Code Here

        if (verbose) {
            log.info("total path: [" + path + "]");
        }

        Address addr = new Address(parentPath);
        Result result = connection.execute(new ReadChildrenNames(addr, confPath));

        if (result.isSuccess()) {

            @SuppressWarnings("unchecked")
View Full Code Here

TOP

Related Classes of org.rhq.modules.plugins.jbossas7.json.Remove

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.