Package org.jboss.as.console.client.shared.subsys.messaging.model

Examples of org.jboss.as.console.client.shared.subsys.messaging.model.JMSEndpoint


        {
            List<Property> propList = response.get("jms-topic").asPropertyList();

            for(Property prop : propList)
            {
                JMSEndpoint topic = factory.topic().as();
                topic.setName(prop.getName());

                ModelNode propValue = prop.getValue();
                String jndi = propValue.get("entries").asList().get(0).asString();
                topic.setJndiName(jndi);

                topics.add(topic);
            }
        }
View Full Code Here


        topicTable.addColumn(jndiColumn, "JNDI");

        topicTable.getSelectionModel().addSelectionChangeHandler(new SelectionChangeEvent.Handler(){
            @Override
            public void onSelectionChange(SelectionChangeEvent event) {
                JMSEndpoint topic = getCurrentSelection();
                presenter.setSelectedTopic(topic);

            }
        });

        // ----

        NumberColumn inQueue = new NumberColumn("message-count", "Queued");
        Column[] cols = new Column[] {
                inQueue.setBaseline(true),
                new NumberColumn("delivering-count","In Delivery").setComparisonColumn(inQueue),
        };

        String title = "In-Flight Messages";

        final HelpSystem.AddressCallback addressCallback = new HelpSystem.AddressCallback() {
            @Override
            public ModelNode getAddress() {
                ModelNode address = new ModelNode();
                address.get(ModelDescriptionConstants.ADDRESS).set(RuntimeBaseAddress.get());
                address.get(ModelDescriptionConstants.ADDRESS).add("subsystem", "messaging");
                address.get(ModelDescriptionConstants.ADDRESS).add("hornetq-server", "default");
                address.get(ModelDescriptionConstants.ADDRESS).add("jms-topic", "*");
                return address;
            }
        };

        if(Console.protovisAvailable())
        {
            inflightSampler = new BulletGraphView(title, "count")
                    .setColumns(cols);
        }
        else
        {
            inflightSampler = new PlainColumnView(title, addressCallback)
                    .setColumns(cols)
                    .setWidth(100, Style.Unit.PCT);
        }

        // ----


        NumberColumn processedCol = new NumberColumn("messages-added", "Added");
        Column[] cols2 = new Column[] {
                processedCol.setBaseline(true),
                new NumberColumn("durable-message-count","Durable").setComparisonColumn(processedCol),
                new NumberColumn("non-durable-message-count","Non-Durable").setComparisonColumn(processedCol)
        };

        String title2 = "Messages Processed";

        if(Console.protovisAvailable())
        {
            processedSampler = new BulletGraphView(title2, "count")
                    .setColumns(cols2);
        }
        else
        {
            processedSampler = new PlainColumnView(title2, addressCallback)
                    .setColumns(cols2)
                    .setWidth(100, Style.Unit.PCT);
        }

        // ----

        NumberColumn subscriptionsCols = new NumberColumn("subscription-count", "Subscriptions");
        Column[] cols3 = new Column[] {
                subscriptionsCols.setBaseline(true),
                new NumberColumn("durable-subscription-count","Durable").setComparisonColumn(subscriptionsCols),
                new NumberColumn("non-durable-subscription-count","Nun-Durable").setComparisonColumn(subscriptionsCols)
        };

        String title3 = "Subscriptions";

        if(Console.protovisAvailable())
        {
            subscriptionSampler = new BulletGraphView(title3, "count")
                    .setColumns(cols3);
        }
        else
        {
            subscriptionSampler = new PlainColumnView(title3, addressCallback)
                    .setColumns(cols3)
                    .setWidth(100, Style.Unit.PCT);
        }

        // ----

        DefaultPager pager = new DefaultPager();
        pager.setDisplay(topicTable);


        ToolStrip topicTools = new ToolStrip();
        topicTools.addToolButtonRight(new ToolButton("Flush", new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                SingleSelectionModel<JMSEndpoint> selectionModel =
                        (SingleSelectionModel<JMSEndpoint>) topicTable.getSelectionModel();

                final JMSEndpoint topic = selectionModel.getSelectedObject();
                Feedback.confirm("Flush Topic", "Do you really want to flush topic " + topic.getName(),
                        new Feedback.ConfirmationHandler() {
                            @Override
                            public void onConfirmation(boolean isConfirmed) {
                                if (isConfirmed) {
                                    presenter.onFlushTopic(topic);
View Full Code Here

        toolStrip.addToolButton(new ToolButton("Delete", new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {

                final JMSEndpoint topic = form.getEditedEntity();
                Feedback.confirm("Remove Topic", "Really remove topic " + topic.getName() + "?",
                        new Feedback.ConfirmationHandler() {
                            @Override
                            public void onConfirmation(boolean isConfirmed) {
                                if (isConfirmed)
                                    presenter.onDeleteTopic(topic);
View Full Code Here

        List<Property> propList = response.get("jms-topic").asPropertyList();
        List<JMSEndpoint> topics = new ArrayList<JMSEndpoint>(propList.size());

        for(Property prop : propList)
        {
            JMSEndpoint topic = factory.topic().as();
            topic.setName(prop.getName());

            ModelNode propValue = prop.getValue();
            String jndi = propValue.get("entries").asList().get(0).asString();
            topic.setJndiName(jndi);

            topics.add(topic);
        }

        getJMSView().setTopics(topics);
View Full Code Here

        topicTable.addColumn(protocolColumn, "JNDI");

        topicTable.getSelectionModel().addSelectionChangeHandler(new SelectionChangeEvent.Handler(){
            @Override
            public void onSelectionChange(SelectionChangeEvent event) {
                JMSEndpoint topic = getCurrentSelection();
                presenter.setSelectedTopic(topic);

            }
        });
        topicTable.getElement().setAttribute("style", "margin-top:15px;margin-bottom:0px;");
View Full Code Here

        {
            List<Property> propList = response.get("jms-topic").asPropertyList();

            for(Property prop : propList)
            {
                JMSEndpoint topic = factory.topic().as();
                topic.setName(prop.getName());

                List<ModelNode> entires = prop.getValue().get("entries").asList();
                List<String> values = new ArrayList<String>(entires.size());
                for (ModelNode entry : entires)
                {
                    values.add(entry.asString());
                }
                topic.setEntries(values);

                topics.add(topic);
            }
        }
View Full Code Here

        topicTable.addColumn(protocolColumn, "JNDI");

        topicTable.getSelectionModel().addSelectionChangeHandler(new SelectionChangeEvent.Handler(){
            @Override
            public void onSelectionChange(SelectionChangeEvent event) {
                JMSEndpoint topic = getCurrentSelection();
                presenter.setSelectedTopic(topic);

            }
        });

        // ----

        NumberColumn inQueue = new NumberColumn("message-count", "Queued");
        Column[] cols = new Column[] {
                inQueue.setBaseline(true),
                new NumberColumn("delivering-count","In Delivery").setComparisonColumn(inQueue),
        };

        String title = "In-Flight Messages";

        final HelpSystem.AddressCallback addressCallback = new HelpSystem.AddressCallback() {
            @Override
            public ModelNode getAddress() {
                ModelNode address = new ModelNode();
                address.get(ModelDescriptionConstants.ADDRESS).set(RuntimeBaseAddress.get());
                address.get(ModelDescriptionConstants.ADDRESS).add("subsystem", "messaging");
                address.get(ModelDescriptionConstants.ADDRESS).add("hornetq-server", "default");
                address.get(ModelDescriptionConstants.ADDRESS).add("jms-topic", "*");
                return address;
            }
        };

        if(Console.protovisAvailable())
        {
            inflightSampler = new BulletGraphView(title, "count")
                    .setColumns(cols);
        }
        else
        {
            inflightSampler = new PlainColumnView(title, addressCallback)
                    .setColumns(cols)
                    .setWidth(100, Style.Unit.PCT);
        }

        // ----


        NumberColumn processedCol = new NumberColumn("messages-added", "Added");
        Column[] cols2 = new Column[] {
                processedCol.setBaseline(true),
                new NumberColumn("durable-message-count","Durable").setComparisonColumn(processedCol),
                new NumberColumn("non-durable-message-count","Non-Durable").setComparisonColumn(processedCol)
        };

        String title2 = "Messages Processed";

        if(Console.protovisAvailable())
        {
            processedSampler = new BulletGraphView(title2, "count")
                    .setColumns(cols2);
        }
        else
        {
            processedSampler = new PlainColumnView(title2, addressCallback)
                    .setColumns(cols2)
                    .setWidth(100, Style.Unit.PCT);
        }

        // ----

        NumberColumn subscriptionsCols = new NumberColumn("subscription-count", "Subscriptions");
        Column[] cols3 = new Column[] {
                subscriptionsCols.setBaseline(true),
                new NumberColumn("durable-subscription-count","Durable").setComparisonColumn(subscriptionsCols),
                new NumberColumn("non-durable-subscription-count","Nun-Durable").setComparisonColumn(subscriptionsCols)
        };

        String title3 = "Subscriptions";

        if(Console.protovisAvailable())
        {
            subscriptionSampler = new BulletGraphView(title3, "count")
                    .setColumns(cols3);
        }
        else
        {
            subscriptionSampler = new PlainColumnView(title3, addressCallback)
                    .setColumns(cols3)
                    .setWidth(100, Style.Unit.PCT);
        }

        // ----

        DefaultPager pager = new DefaultPager();
        pager.setDisplay(topicTable);


        ToolStrip topicTools = new ToolStrip();
        topicTools.addToolButtonRight(new ToolButton("Flush", new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                SingleSelectionModel<JMSEndpoint> selectionModel =
                        (SingleSelectionModel<JMSEndpoint>) topicTable.getSelectionModel();

                final JMSEndpoint topic = selectionModel.getSelectedObject();
                Feedback.confirm("Flush Topic", "Do you really want to flush topic " + topic.getName(),
                        new Feedback.ConfirmationHandler() {
                            @Override
                            public void onConfirmation(boolean isConfirmed) {
                                presenter.onFlushTopic(topic);
                            }
View Full Code Here

        topicTable.addColumn(protocolColumn, "JNDI");

        topicTable.getSelectionModel().addSelectionChangeHandler(new SelectionChangeEvent.Handler(){
            @Override
            public void onSelectionChange(SelectionChangeEvent event) {
                JMSEndpoint topic = getCurrentSelection();
                presenter.setSelectedTopic(topic);

            }
        });

        // ----

        NumberColumn inQueue = new NumberColumn("message-count", "Messages in Topic");
        Column[] cols = new Column[] {
                inQueue.setBaseline(true),
                new NumberColumn("delivering-count","In Delivery").setComparisonColumn(inQueue),
        };

        String title = "In-Flight Messages";

        final HelpSystem.AddressCallback addressCallback = new HelpSystem.AddressCallback() {
            @Override
            public ModelNode getAddress() {
                ModelNode address = new ModelNode();
                address.get(ModelDescriptionConstants.ADDRESS).set(RuntimeBaseAddress.get());
                address.get(ModelDescriptionConstants.ADDRESS).add("subsystem", "messaging");
                address.get(ModelDescriptionConstants.ADDRESS).add("hornetq-server", "default");
                address.get(ModelDescriptionConstants.ADDRESS).add("jms-topic", "*");
                return address;
            }
        };

        inflightSampler = new PlainColumnView(title, addressCallback)
                .setColumns(cols)
                .setWidth(100, Style.Unit.PCT);


        // ----


        NumberColumn processedCol = new NumberColumn("messages-added", "Messages Added");
        Column[] cols2 = new Column[] {
                processedCol.setBaseline(true),
                new NumberColumn("durable-message-count","Number Durable Messages").setComparisonColumn(processedCol),
                new NumberColumn("non-durable-message-count","Number Non-Durable Messages").setComparisonColumn(processedCol)
        };

        String title2 = "Messages Processed";

        processedSampler = new PlainColumnView(title2, addressCallback)
                .setColumns(cols2)
                .setWidth(100, Style.Unit.PCT);


        // ----

        NumberColumn subscriptionsCols = new NumberColumn("subscription-count", "Number of Subscriptions");
        Column[] cols3 = new Column[] {
                subscriptionsCols.setBaseline(true),
                new NumberColumn("durable-subscription-count","Durable Subscribers").setComparisonColumn(subscriptionsCols),
                new NumberColumn("non-durable-subscription-count","Nun-Durable Subscribers").setComparisonColumn(subscriptionsCols)
        };

        String title3 = "Subscriptions";

        subscriptionSampler = new PlainColumnView(title3, addressCallback)
                .setColumns(cols3)
                .setWidth(100, Style.Unit.PCT);


        // ----

        DefaultPager pager = new DefaultPager();
        pager.setDisplay(topicTable);


        ToolStrip topicTools = new ToolStrip();
        topicTools.addToolButtonRight(new ToolButton("Flush", new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                SingleSelectionModel<JMSEndpoint> selectionModel =
                        (SingleSelectionModel<JMSEndpoint>) topicTable.getSelectionModel();

                final JMSEndpoint topic = selectionModel.getSelectedObject();
                Feedback.confirm("Flush Topic", "Do you really want to flush topic " + topic.getName(),
                        new Feedback.ConfirmationHandler() {
                            @Override
                            public void onConfirmation(boolean isConfirmed) {
                                presenter.onFlushTopic(topic);
                            }
View Full Code Here

        topicTable.addColumn(protocolColumn, "JNDI");

        topicTable.getSelectionModel().addSelectionChangeHandler(new SelectionChangeEvent.Handler(){
            @Override
            public void onSelectionChange(SelectionChangeEvent event) {
                JMSEndpoint topic = getCurrentSelection();
                presenter.setSelectedTopic(topic);

            }
        });

        // ----

        NumberColumn inQueue = new NumberColumn("message-count", "Messages in Topic");
        Column[] cols = new Column[] {
                inQueue.setBaseline(true),
                new NumberColumn("delivering-count","In Delivery").setComparisonColumn(inQueue),
        };

        String title = "In-Flight Messages";

        final HelpSystem.AddressCallback addressCallback = new HelpSystem.AddressCallback() {
            @Override
            public ModelNode getAddress() {
                ModelNode address = new ModelNode();
                address.get(ModelDescriptionConstants.ADDRESS).set(RuntimeBaseAddress.get());
                address.get(ModelDescriptionConstants.ADDRESS).add("subsystem", "messaging");
                address.get(ModelDescriptionConstants.ADDRESS).add("hornetq-server", "default");
                address.get(ModelDescriptionConstants.ADDRESS).add("jms-topic", "*");
                return address;
            }
        };

        inflightSampler = new PlainColumnView(title, addressCallback)
                .setColumns(cols)
                .setWidth(100, Style.Unit.PCT);


        // ----


        NumberColumn processedCol = new NumberColumn("messages-added", "Messages Added");
        Column[] cols2 = new Column[] {
                processedCol.setBaseline(true),
                new NumberColumn("durable-message-count","Number Durable Messages").setComparisonColumn(processedCol),
                new NumberColumn("non-durable-message-count","Number Non-Durable Messages").setComparisonColumn(processedCol)
        };

        String title2 = "Messages Processed";

        processedSampler = new PlainColumnView(title2, addressCallback)
                .setColumns(cols2)
                .setWidth(100, Style.Unit.PCT);


        // ----

        NumberColumn subscriptionsCols = new NumberColumn("subscription-count", "Number of Subscriptions");
        Column[] cols3 = new Column[] {
                subscriptionsCols.setBaseline(true),
                new NumberColumn("durable-subscription-count","Durable Subscribers").setComparisonColumn(subscriptionsCols),
                new NumberColumn("non-durable-subscription-count","Nun-Durable Subscribers").setComparisonColumn(subscriptionsCols)
        };

        String title3 = "Subscriptions";

        subscriptionSampler = new PlainColumnView(title3, addressCallback)
                .setColumns(cols3)
                .setWidth(100, Style.Unit.PCT);


        // ----

        DefaultPager pager = new DefaultPager();
        pager.setDisplay(topicTable);


        ToolStrip topicTools = new ToolStrip();
        topicTools.addToolButtonRight(new ToolButton("Flush", new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                SingleSelectionModel<JMSEndpoint> selectionModel =
                        (SingleSelectionModel<JMSEndpoint>) topicTable.getSelectionModel();

                final JMSEndpoint topic = selectionModel.getSelectedObject();
                Feedback.confirm("Flush Topic", "Do you really want to flush topic " + topic.getName(),
                        new Feedback.ConfirmationHandler() {
                            @Override
                            public void onConfirmation(boolean isConfirmed) {
                                presenter.onFlushTopic(topic);
                            }
View Full Code Here

        {
            List<Property> propList = response.get("jms-topic").asPropertyList();

            for(Property prop : propList)
            {
                JMSEndpoint topic = factory.topic().as();
                topic.setName(prop.getName());

                List<ModelNode> entires = prop.getValue().get("entries").asList();
                List<String> values = new ArrayList<String>(entires.size());
                for (ModelNode entry : entires)
                {
                    values.add(entry.asString());
                }
                topic.setEntries(values);

                topics.add(topic);
            }
        }
View Full Code Here

TOP

Related Classes of org.jboss.as.console.client.shared.subsys.messaging.model.JMSEndpoint

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.