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

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


        }
    }

    @SuppressWarnings("unchecked")
    private Collection<String> getServerGroups() {
        Operation op = new ReadChildrenNames(new Address(), "server-group");
        Result res = getASConnection().execute(op);

        return (Collection<String>) res.getResult();
    }
View Full Code Here


    private void ensureGlobalEJB3StatisticsEnabled() {
        if (ejb3StatisticsEnalbed != null && ejb3StatisticsEnalbed.booleanValue()) {
            return;
        }
        BaseServerComponent server = getServerComponent();
        Address ejbAddress = new Address(server.getServerAddress());
        ejbAddress.add("subsystem", "ejb3");
        try {
            ejb3StatisticsEnalbed = readAttribute(ejbAddress, "enable-statistics", Boolean.class);
            if (!Boolean.TRUE.equals(ejb3StatisticsEnalbed)) {
                getLog().debug("Enabling global EJB3 statistics");
                WriteAttribute op = new WriteAttribute(ejbAddress, "enable-statistics", true);
View Full Code Here

                if (outcome.equals(SUCCESS)) { // Upload was successful, so now add the file to the server group
                    JsonNode resultNode = uploadResult.get("result");
                    String hash = resultNode.get("BYTES_VALUE").getTextValue();
                    ASConnection connection = getASConnection();

                    Address deploymentsAddress = new Address();
                    deploymentsAddress.add("deployment", packageName);
                    Operation step1 = new Operation("add", deploymentsAddress);
                    //                    step1.addAdditionalProperty("hash", new PROPERTY_VALUE("BYTES_VALUE", hash));
                    List<Object> content = new ArrayList<Object>(1);
                    Map<String, Object> contentValues = new HashMap<String, Object>();
                    contentValues.put("hash", new PROPERTY_VALUE("BYTES_VALUE", hash));
                    content.add(contentValues);
                    step1.addAdditionalProperty("content", content);

                    step1.addAdditionalProperty("name", packageName);

                    Address serverGroupAddress = new Address(context.getResourceKey());
                    serverGroupAddress.add("deployment", packageName);
                    Operation step2 = new Operation("add", serverGroupAddress);
                    Operation step3 = new Operation("deploy", serverGroupAddress);

                    CompositeOperation cop = new CompositeOperation();
                    cop.addStep(step1);
View Full Code Here

    private final Address path;
    private final ASConnection connection;

    public JdrReportRunner(Address path, ASConnection con) {
        this.path = new Address(path);
        this.connection = con;
        this.path.addSegment("subsystem=jdr");
    }
View Full Code Here

        Configuration conf = new Configuration();
        conf.put(new PropertySimple("needed", "test"));
        conf.put(new PropertySimple("optional", null));

        CompositeOperation cop = delegate.updateGenerateOperationFromProperties(conf, new Address());

        Assert.assertEquals(cop.numberOfSteps(), 2);

        for (int i = 0; i < cop.numberOfSteps(); i++) {
            Operation step = cop.step(0);
View Full Code Here

        PropertyList propertyList = new PropertyList("foo", new PropertySimple("optional", "Hello"),
            new PropertySimple("optional", null), new PropertySimple("optional", "world"));

        conf.put(propertyList);

        CompositeOperation cop = delegate.updateGenerateOperationFromProperties(conf, new Address());

        assert cop.numberOfSteps() == 1 : "#Steps should be 1 but were " + cop.numberOfSteps();
        Operation step1 = cop.step(0);
        assert step1.getOperation().equals("write-attribute");
        Map<String, Object> props = step1.getAdditionalProperties();
View Full Code Here

        PropertyMap propertyMap = new PropertyMap("foo", new PropertySimple("needed", "Hello"), new PropertySimple(
            "optional", "world"));

        conf.put(propertyMap);

        CompositeOperation cop = delegate.updateGenerateOperationFromProperties(conf, new Address());

        assert cop.numberOfSteps() == 1 : "#Steps should be 1 but were " + cop.numberOfSteps();
        Operation step1 = cop.step(0);
        assert step1.getOperation().equals("write-attribute");
        Map<String, Object> props = step1.getAdditionalProperties();
View Full Code Here

        PropertyMap propertyMap = new PropertyMap("foo", new PropertySimple("needed", "Hello"), new PropertySimple(
            "readOnly", "world"));

        conf.put(propertyMap);

        CompositeOperation cop = delegate.updateGenerateOperationFromProperties(conf, new Address());

        assert cop.numberOfSteps() == 1 : "#Steps should be 1 but were " + cop.numberOfSteps();
        Operation step1 = cop.step(0);
        assert step1.getOperation().equals("write-attribute");
        Map<String, Object> props = step1.getAdditionalProperties();
View Full Code Here

        Configuration conf = new Configuration();
        PropertyMap propertyMap = new PropertyMap("foo", new PropertySimple("needed", "Hello"));

        conf.put(propertyMap);

        CompositeOperation cop = delegate.updateGenerateOperationFromProperties(conf, new Address());

        assert cop.numberOfSteps() == 1 : "#Steps should be 1 but were " + cop.numberOfSteps();
        Operation step1 = cop.step(0);
        assert step1.getOperation().equals("write-attribute");
        Map<String, Object> props = step1.getAdditionalProperties();
View Full Code Here

        PropertyList propertyList = new PropertyList("foo", propertyMap);

        conf.put(propertyList);

        CompositeOperation cop = delegate.updateGenerateOperationFromProperties(conf, new Address());

        assert cop.numberOfSteps() == 1 : "#Steps should be 1 but were " + cop.numberOfSteps();
        Operation step1 = cop.step(0);
        assert step1.getOperation().equals("write-attribute");
        Map<String, Object> props = step1.getAdditionalProperties();
View Full Code Here

TOP

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

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.