Package org.jboss.dmr

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


            }
        }
        // outbound-socket-binding (for local destination)
        if (bindingGroup.hasDefined(LOCAL_DESTINATION_OUTBOUND_SOCKET_BINDING)) {
            final ModelNode localDestinationOutboundSocketBindings = bindingGroup.get(LOCAL_DESTINATION_OUTBOUND_SOCKET_BINDING);
            for (final String outboundSocketBindingName : localDestinationOutboundSocketBindings.keys()) {
                final ModelNode outboundSocketBinding = localDestinationOutboundSocketBindings.get(outboundSocketBindingName);
                // <outbound-socket-binding>
                writer.writeStartElement(Element.OUTBOUND_SOCKET_BINDING.getLocalName());
                // name of the outbound socket binding
                writeAttribute(writer, Attribute.NAME, outboundSocketBindingName);
View Full Code Here


            }
        }
        // outbound-socket-binding (for remote destination)
        if (bindingGroup.hasDefined(REMOTE_DESTINATION_OUTBOUND_SOCKET_BINDING)) {
            final ModelNode remoteDestinationOutboundSocketBindings = bindingGroup.get(REMOTE_DESTINATION_OUTBOUND_SOCKET_BINDING);
            for (final String outboundSocketBindingName : remoteDestinationOutboundSocketBindings.keys()) {
                final ModelNode outboundSocketBinding = remoteDestinationOutboundSocketBindings.get(outboundSocketBindingName);
                // <outbound-socket-binding>
                writer.writeStartElement(Element.OUTBOUND_SOCKET_BINDING.getLocalName());
                // name of the outbound socket binding
                writeAttribute(writer, Attribute.NAME, outboundSocketBindingName);
View Full Code Here

                            final String name = this.name.getValue(ctx.getParsedCommandLine());
                            if(name == null) {
                                ctx.printLine("Attribute name is not available in handleResponse.");
                            } else if(attributes.hasDefined(name)) {
                                final ModelNode descr = attributes.get(name);
                                for(String prop : descr.keys()) {
                                    table.addLine(new String[]{prop, descr.get(prop).asString()});
                                }
                            } else {
                                ctx.printLine("Attribute description is not available.");
                            }
View Full Code Here

        }
        final ModelNode result = opResponse.get(Util.RESULT);
        if(composite) {
            final Set<String> keys;
            try {
                keys = result.keys();
            } catch(Exception e) {
                ctx.printLine("Failed to get step results from a composite operation response " + opResponse);
                e.printStackTrace();
                return null;
            }
View Full Code Here

        }
        final ModelNode result = opResponse.get(Util.RESULT);
        if(composite) {
            final Set<String> keys;
            try {
                keys = result.keys();
            } catch(Exception e) {
                ctx.printLine("Failed to get step results from a composite operation response " + opResponse);
                e.printStackTrace();
                return null;
            }
View Full Code Here

            writeAttribute(writer, Attribute.ACTIVATION, node.get(ACTIVATION));
        }

        if (has(node, CONFIGURATION)) {
            ModelNode configuration = node.get(CONFIGURATION);
            for (String pid : new TreeSet<String>(configuration.keys())) {
                writer.writeStartElement(Element.CONFIGURATION.getLocalName());
                writer.writeAttribute(Attribute.PID.getLocalName(), pid);

                ModelNode properties = configuration.get(pid).get(ENTRIES);
                for (String propKey : properties.keys()) {
View Full Code Here

            for (String pid : new TreeSet<String>(configuration.keys())) {
                writer.writeStartElement(Element.CONFIGURATION.getLocalName());
                writer.writeAttribute(Attribute.PID.getLocalName(), pid);

                ModelNode properties = configuration.get(pid).get(ENTRIES);
                for (String propKey : properties.keys()) {
                    String value = properties.get(propKey).asString();
                    writer.writeStartElement(Element.PROPERTY.getLocalName());
                    writer.writeAttribute(Attribute.NAME.getLocalName(), propKey);
                    writer.writeCharacters(value);
                    writer.writeEndElement();
View Full Code Here

        }

        if (has(node, PROPERTY)) {
            writer.writeStartElement(Element.PROPERTIES.getLocalName());
            ModelNode properties = node.get(PROPERTY);
            for (String key : new TreeSet<String>(properties.keys())) {
                String val = properties.get(key).get(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, MODULE)) {
            writer.writeStartElement(Element.MODULES.getLocalName());
            ModelNode modules = node.get(MODULE);
            for (String key: modules.keys()) {
                ModelNode moduleNode = modules.get(key);
                writer.writeEmptyElement(Element.MODULE.getLocalName());
                writer.writeAttribute(Attribute.IDENTIFIER.getLocalName(), key);
                if (moduleNode.has(STARTLEVEL)) {
                    writeAttribute(writer, Attribute.STARTLEVEL, moduleNode.require(STARTLEVEL));
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

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.