Package org.jboss.dmr

Examples of org.jboss.dmr.ModelNode.keys()


                        final ModelNode preHandlerChainAdd = getHandlerChainAddOperation(preHandlerChainAddress, preHandlerChain);
                        result.add(preHandlerChainAdd);

                        if (preHandlerChain.hasDefined(HANDLER)) {
                            final ModelNode handlers = preHandlerChain.get(HANDLER);
                            for (final String handlerName : handlers.keys()) {
                                final ModelNode handler = handlers.get(handlerName);
                                final ModelNode handlerAddress = preHandlerChainAddress.clone().add(HANDLER, handlerName);
                                final ModelNode handlerAdd = getHandlerAddOperation(handlerAddress, handler);
                                result.add(handlerAdd);
                            }
View Full Code Here


                    }
                }

                if (endpointConfig.hasDefined(POST_HANDLER_CHAIN)) {
                    final ModelNode postHandlerChains = endpointConfig.get(POST_HANDLER_CHAIN);
                    for (final String postHandlerChainName : postHandlerChains.keys()) {
                        final ModelNode postHandlerChain = postHandlerChains.get(postHandlerChainName);
                        final ModelNode postHandlerChainAddress = endpointConfigAddress.clone().add(POST_HANDLER_CHAIN, postHandlerChainName);
                        final ModelNode postHandlerChainAdd = getHandlerChainAddOperation(postHandlerChainAddress, postHandlerChain);
                        result.add(postHandlerChainAdd);
View Full Code Here

        }

        if (has(node, ModelConstants.PROPERTY)) {
            writer.writeStartElement(Element.PROPERTIES.getLocalName());
            ModelNode properties = node.get(ModelConstants.PROPERTY);
            for (String key : new TreeSet<String>(properties.keys())) {
                String val = properties.get(key).get(ModelConstants.VALUE).asString();
                writer.writeStartElement(Element.PROPERTY.getLocalName());
                writer.writeAttribute(Attribute.NAME.getLocalName(), key);
                writer.writeCharacters(val);
                writer.writeEndElement();
View Full Code Here

        }

        if (has(node, ModelConstants.CAPABILITY)) {
            writer.writeStartElement(Element.CAPABILITIES.getLocalName());
            ModelNode modules = node.get(ModelConstants.CAPABILITY);
            for (String key : modules.keys()) {
                ModelNode moduleNode = modules.get(key);
                writer.writeEmptyElement(Element.CAPABILITY.getLocalName());
                writer.writeAttribute(Attribute.NAME.getLocalName(), key);
                if (moduleNode.has(ModelConstants.STARTLEVEL)) {
                    writeAttribute(writer, Attribute.STARTLEVEL, moduleNode.require(ModelConstants.STARTLEVEL));
View Full Code Here

                        final ModelNode postHandlerChainAdd = getHandlerChainAddOperation(postHandlerChainAddress, postHandlerChain);
                        result.add(postHandlerChainAdd);

                        if (postHandlerChain.hasDefined(HANDLER)) {
                            final ModelNode handlers = postHandlerChain.get(HANDLER);
                            for (final String handlerName : handlers.keys()) {
                                final ModelNode handler = handlers.get(handlerName);
                                final ModelNode handlerAddress = postHandlerChainAddress.clone().add(HANDLER, handlerName);
                                final ModelNode handlerAdd = getHandlerAddOperation(handlerAddress, handler);
                                result.add(handlerAdd);
                            }
View Full Code Here

                    }
                }

                if (endpointConfig.hasDefined(PROPERTY)) {
                    final ModelNode properties = endpointConfig.get(PROPERTY);
                    for (final String propertyName : properties.keys()) {
                        final ModelNode property = properties.get(propertyName);
                        final ModelNode propertyAddress = endpointConfigAddress.clone().add(PROPERTY, propertyName);
                        final ModelNode propertyAdd = getPropertyAddOperation(propertyAddress, property);
                        result.add(propertyAdd);
                    }
View Full Code Here

        writer.writeEndElement();

        writer.writeStartElement(Element.PROPERTIES.getLocalName());
        ModelNode properties = node.get(ModelConstants.PROPERTY);
        if (properties.isDefined()) {
            for (String key : properties.keys()) {
                String val = properties.get(key).get(ModelConstants.VALUE).asString();
                writer.writeStartElement(Element.PROPERTY.getLocalName());
                writer.writeAttribute(Attribute.NAME.getLocalName(), key);
                writer.writeAttribute(Attribute.VALUE.getLocalName(), val);
                writer.writeEndElement();
View Full Code Here

        if (node.has(JMS_QUEUE) || node.has(JMS_TOPIC)) {
           ModelNode queue = node.get(JMS_QUEUE);
           ModelNode topic = node.get(JMS_TOPIC);
           boolean hasQueue = queue.isDefined() && queue.keys().size() > 0;
           boolean hasTopic = topic.isDefined() && topic.keys().size() > 0;
           if (hasQueue || hasTopic) {
               writer.writeStartElement(JMS_DESTINATIONS);
               if (hasQueue) {
                   writeJmsQueues(writer, node.get(JMS_QUEUE));
               }
View Full Code Here

        writeWorkerThreadPoolIfAttributesSet(writer, model);

        if (model.hasDefined(CONNECTOR)) {
            final ModelNode connector = model.get(CONNECTOR);
            for (String name : connector.keys()) {
                writeConnector(writer, connector.require(name), name);
            }
        }
        if (model.hasDefined(OUTBOUND_CONNECTION) || model.hasDefined(REMOTE_OUTBOUND_CONNECTION) || model.hasDefined(LOCAL_OUTBOUND_CONNECTION)) {
            // write <outbound-connections> element
View Full Code Here

        }
        final ModelNode result = opResponse.get(Util.RESULT);
        if(composite) {
            final Set<String> keys;
            try {
                keys = result.keys();
            } catch(Exception e) {
                throw new CommandFormatException("Failed to get step results from a composite operation response " + opResponse);
            }
            for(String key : keys) {
                final ModelNode stepResponse = result.get(key);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.