Package org.jboss.dmr.client

Examples of org.jboss.dmr.client.ModelNode


        window.setGlassEnabled(true);
        window.center();
    }

    public void onDeleteProtocol(JGroupsProtocol editedEntity) {
        ModelNode operation = new ModelNode();
        operation.get(ADDRESS).set(Baseadress.get());
        operation.get(ADDRESS).add("subsystem", "jgroups");
        operation.get(ADDRESS).add("stack", selectedStack);
        operation.get(OP).set("remove-protocol");
        operation.get("type").set(editedEntity.getType());

        dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {
            @Override
            public void onSuccess(DMRResponse result) {
                ModelNode response = result.get();

                if (response.isFailure()) {
                    Console.error(Console.MESSAGES.deletionFailed("Protocol"), response.getFailureDescription());
                } else {
                    Console.info(Console.MESSAGES.deleted("Protocol"));

                    loadStacks(true);
                }
View Full Code Here


    }

    public void onSaveProtocol(JGroupsProtocol entity, Map<String, Object> changeset) {

        ModelNode address = new ModelNode();
        address.get(ADDRESS).set(Baseadress.get());
        address.get(ADDRESS).add("subsystem", "jgroups");
        address.get(ADDRESS).add("stack", selectedStack);
        address.get(ADDRESS).add("protocol", entity.getType());

        ModelNode operation = protocolAdapter.fromChangeset(changeset, address);

        dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {
            @Override
            public void onSuccess(DMRResponse result) {
                ModelNode response = result.get();

                if (response.isFailure()) {
                    Console.error(Console.MESSAGES.modificationFailed("Protocol"), response.getFailureDescription());
                } else {
                    Console.info(Console.MESSAGES.modified("Protocol"));

                    loadStacks(true);
                }
View Full Code Here

    public void onCreateProtocol(JGroupsProtocol entity) {

        closeDialoge();

        ModelNode operation = protocolAdapter.fromEntity(entity);
        operation.get(ADDRESS).set(Baseadress.get());
        operation.get(ADDRESS).add("subsystem", "jgroups");
        operation.get(ADDRESS).add("stack", selectedStack);
        operation.get(OP).set("add-protocol");

        dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {
            @Override
            public void onSuccess(DMRResponse result) {
                ModelNode response = result.get();

                if (response.isFailure()) {
                    Console.error(Console.MESSAGES.addingFailed("Protocol"), response.getFailureDescription());
                } else {
                    Console.info(Console.MESSAGES.added("Protocol"));

                    loadStacks(true);
                }
View Full Code Here

    public void onCreateProperty(String reference, PropertyRecord prop) {
        closePropertyDialoge();

        String[] tokens = reference.split("_#_");

        ModelNode operation = new ModelNode();
        operation.get(ADDRESS).set(Baseadress.get());
        operation.get(ADDRESS).add("subsystem", "jgroups");
        operation.get(ADDRESS).add("stack", tokens[0]);
        operation.get(ADDRESS).add("protocol", tokens[1]);
        operation.get(ADDRESS).add("property", prop.getKey());
        operation.get(OP).set(ADD);
        operation.get(VALUE).set(prop.getValue());

        dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {
            @Override
            public void onSuccess(DMRResponse result) {
                ModelNode response = result.get();

                if (response.isFailure()) {
                    Console.error(Console.MESSAGES.addingFailed("Protocol Property"), response.getFailureDescription());
                } else {
                    Console.info(Console.MESSAGES.added("Protocol Property"));

                    loadStacks(true);
                }
View Full Code Here

    @Override
    public void onDeleteProperty(String reference, PropertyRecord prop) {
        String[] tokens = reference.split("_#_");

        ModelNode operation = new ModelNode();
        operation.get(ADDRESS).set(Baseadress.get());
        operation.get(ADDRESS).add("subsystem", "jgroups");
        operation.get(ADDRESS).add("stack", tokens[0]);
        operation.get(ADDRESS).add("protocol", tokens[1]);
        operation.get(ADDRESS).add("property", prop.getKey());
        operation.get(OP).set(REMOVE);

        dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {
            @Override
            public void onSuccess(DMRResponse result) {
                ModelNode response = result.get();

                if (response.isFailure()) {
                    Console.error(Console.MESSAGES.deletionFailed("Protocol Property"), response.getFailureDescription());
                } else {
                    Console.info(Console.MESSAGES.deleted("Protocol Property"));

                    loadStacks(true);
                }
View Full Code Here

        if(propertyWindow!=null)
            propertyWindow.hide();
    }

    public void onSaveTransport(JGroupsTransport entity, Map<String, Object> changeset) {
        ModelNode address = new ModelNode();
        address.get(ADDRESS).set(Baseadress.get());
        address.get(ADDRESS).add("subsystem", "jgroups");
        address.get(ADDRESS).add("stack", selectedStack);
        address.get(ADDRESS).add("transport", "TRANSPORT");

        ModelNode operation = transportAdapter.fromChangeset(changeset, address);

        dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {
            @Override
            public void onSuccess(DMRResponse result) {
                ModelNode response = result.get();

                if (response.isFailure()) {
                    Console.error(Console.MESSAGES.modificationFailed("Transport"), response.getFailureDescription());
                } else {
                    Console.info(Console.MESSAGES.modified("Transport"));

                    loadStacks(true);
                }
View Full Code Here

        final FormHelpPanel helpPanel = new FormHelpPanel(
                new FormHelpPanel.AddressCallback() {
                    @Override
                    public ModelNode getAddress() {
                        ModelNode address = Baseadress.get();
                        address.add("subsystem", "jca");
                        address.add("bootstrap-context", "*");
                        return address;
                    }
                }, form
        );

View Full Code Here

        this.dispatcher = dispatcher;
        this.factory = factory;
        this.revealStrategy = revealStrategy;


        ModelNode address = new ModelNode();
        //address.get(ADDRESS).setEmptyList();

        loadPropCmd = new LoadPropertiesCmd(dispatcher, factory, address);
    }
View Full Code Here

        if(propertyWindow!=null && propertyWindow.isShowing())
        {
            propertyWindow.hide();
        }

        ModelNode operation = new ModelNode();
        operation.get(OP).set(ADD);
        operation.get(ADDRESS).add("system-property", prop.getKey());
        operation.get("value").set(prop.getValue());
        operation.get("boot-time").set(prop.isBootTime());

        dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {
            @Override
            public void onSuccess(DMRResponse result) {
                Console.info(Console.MESSAGES.added("Property " + prop.getKey()));
View Full Code Here

    }

    public void onDeleteProperty(final String groupName, final PropertyRecord prop)
    {
        ModelNode operation = new ModelNode();
        operation.get(OP).set(REMOVE);
        operation.get(ADDRESS).add("system-property", prop.getKey());

        dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {
            @Override
            public void onSuccess(DMRResponse result) {
                Console.info(Console.MESSAGES.deleted("Property " + prop.getKey()));
View Full Code Here

TOP

Related Classes of org.jboss.dmr.client.ModelNode

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.