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

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


        dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {

            @Override
            public void onSuccess(DMRResponse result) {
                ModelNode response = result.get();
                MessagingProvider provider = providerAdapter.fromDMR(response.get(RESULT));
                provider.setName(currentServer);
                getView().setProviderDetails(provider);

            }
        });
    }
View Full Code Here


        dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {

            @Override
            public void onSuccess(DMRResponse result) {
                ModelNode response = result.get();
                MessagingProvider provider = providerAdapter.fromDMR(response.get(RESULT));
                provider.setName(currentServer);
                getView().setProviderDetails(provider);

            }
        });
    }
View Full Code Here

        dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {

            @Override
            public void onSuccess(DMRResponse result) {
                ModelNode response = ModelNode.fromBase64(result.getResponseText());
                MessagingProvider provider = parseResponse(response);

                providerEntity = provider;
                getView().setProviderDetails(provider);

            }
View Full Code Here

    }

    private MessagingProvider parseResponse(ModelNode response) {
        ModelNode model = response.get("result").asObject();

        MessagingProvider provider = factory.messagingProvider().as();
        provider.setName("HornetQ"); // TODO: can this be retrieved incl. version?

        provider.setPersistenceEnabled(model.get("persistence-enabled").asBoolean());

        // security
        List<SecurityPattern> secPatterns = new ArrayList<SecurityPattern>();
        if(model.hasDefined("security-setting"))
        {
            List<Property> secProps = model.get("security-setting").asPropertyList();

            for(Property prop : secProps)
            {
                SecurityPattern pattern = factory.messagingSecurity().as();
                pattern.setPattern(prop.getName());

                Property principalProp= prop.getValue().asProperty();
                pattern.setPrincipal(principalProp.getName());

                ModelNode propValue = principalProp.getValue().asObject();
                pattern.setSend(propValue.get("send").asBoolean());
                pattern.setConsume(propValue.get("consume").asBoolean());
                pattern.setManage(propValue.get("manage").asBoolean());
                pattern.setCreateDurableQueue(propValue.get("createDurableQueue").asBoolean());
                pattern.setDeleteDurableQueue(propValue.get("deleteDurableQueue").asBoolean());
                pattern.setCreateNonDurableQueue(propValue.get("createNonDurableQueue").asBoolean());
                pattern.setDeleteNonDurableQueue(propValue.get("deleteNonDurableQueue").asBoolean());

                secPatterns.add(pattern);
            }

        }
        provider.setSecurityPatterns(secPatterns);

        // addressing
        List<AddressingPattern> addrPatterns = new ArrayList<AddressingPattern>();
        if(model.hasDefined("address-setting"))
        {
            List<Property> addrProps = model.get("address-setting").asPropertyList();
            for(Property prop : addrProps)
            {
                AddressingPattern pattern = factory.messagingAddress().as();
                pattern.setPattern(prop.getName());

                ModelNode propValue = prop.getValue().asObject();
                pattern.setDeadLetterQueue(propValue.get("dead-letter-address").asString());
                pattern.setExpiryQueue(propValue.get("expiry-address").asString());
                pattern.setRedeliveryDelay(propValue.get("redelivery-delay").asInt());

                addrPatterns.add(pattern);
            }
        }

        provider.setAddressPatterns(addrPatterns);


        // socket binding ref
        if(model.hasDefined("connector"))
        {
            List<Property> connectorPropList = model.get("connector").asPropertyList();
            for(Property connectorProp : connectorPropList)
            {
                if("netty".equals(connectorProp.getName()))
                {
                    String socketBinding = connectorProp.getValue().asObject().get("socket-binding").asString();
                    provider.setConnectorBinding(socketBinding);
                }
            }
        }

        if(model.hasDefined("acceptor"))
        {
            List<Property> acceptorPropList = model.get("acceptor").asPropertyList();
            for(Property acceptorProp : acceptorPropList)
            {
                if("netty".equals(acceptorProp.getName()))
                {
                    String socketBinding = acceptorProp.getValue().asObject().get("socket-binding").asString();
                    provider.setAcceptorBinding(socketBinding);
                }
            }
        }

        return provider;
View Full Code Here

        dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {

            @Override
            public void onSuccess(DMRResponse result) {
                ModelNode response = result.get();
                MessagingProvider provider = providerAdapter.fromDMR(response.get(RESULT));
                provider.setName(currentServer);
                getView().setProviderDetails(provider);

            }
        });
    }
View Full Code Here

        dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {

            @Override
            public void onSuccess(DMRResponse result) {
                ModelNode response = result.get();
                MessagingProvider provider = providerAdapter.fromDMR(response.get(RESULT));
                provider.setName(currentServer);
                getView().setProviderDetails(provider);

            }
        });
    }
View Full Code Here

        dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {

            @Override
            public void onSuccess(DMRResponse result) {
                ModelNode response = result.get();
                MessagingProvider provider = providerAdapter.fromDMR(response.get(RESULT));
                provider.setName(currentServer);
                getView().setProviderDetails(provider);

            }
        });
    }
View Full Code Here

        dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {

            @Override
            public void onSuccess(DMRResponse result) {
                ModelNode response = ModelNode.fromBase64(result.getResponseText());
                MessagingProvider provider = providerAdapter.fromDMR(response.get(RESULT));
                provider.setName(currentServer);
                getView().setProviderDetails(provider);

            }
        });
    }
View Full Code Here

TOP

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

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.