当前位置: 首页>>代码示例>>Java>>正文


Java SubsystemMarshallingContext.getModelNode方法代码示例

本文整理汇总了Java中org.jboss.as.controller.persistence.SubsystemMarshallingContext.getModelNode方法的典型用法代码示例。如果您正苦于以下问题:Java SubsystemMarshallingContext.getModelNode方法的具体用法?Java SubsystemMarshallingContext.getModelNode怎么用?Java SubsystemMarshallingContext.getModelNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jboss.as.controller.persistence.SubsystemMarshallingContext的用法示例。


在下文中一共展示了SubsystemMarshallingContext.getModelNode方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writeContent

import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
@Override
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException {
    context.startSubsystemElement(Namespace.CURRENT.getUriString(), false);
    ModelNode node = context.getModelNode();

    if (node.hasDefined(ModelConstants.CONTEXT)) {
        ModelNode properties = node.get(ModelConstants.CONTEXT);
        for (String key : new TreeSet<String>(properties.keys())) {
            String val = properties.get(key).get(ModelConstants.VALUE).asString();
            writer.writeStartElement(Element.CAMEL_CONTEXT.getLocalName());
            writer.writeAttribute(Attribute.ID.getLocalName(), key);
            writer.writeCharacters(val);
            writer.writeEndElement();
        }
    }

    writer.writeEndElement();
}
 
开发者ID:wildfly-extras,项目名称:wildfly-camel,代码行数:19,代码来源:CamelSubsystemWriter.java

示例2: writeJobExecutorContent

import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
private void writeJobExecutorContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context) throws XMLStreamException {
  ModelNode node = context.getModelNode();
  ModelNode jobExecutorNode = node.get(Element.JOB_EXECUTOR.getLocalName());
  
  if (jobExecutorNode.isDefined()) { 
    writer.writeStartElement(Element.JOB_EXECUTOR.getLocalName());
    
    Property property = jobExecutorNode.asProperty();
    writeElement(Element.THREAD_POOL_NAME, writer, property.getValue());
    
    writeJobAcquisitionsContent(writer, context, property.getValue());
    
    // end job-executor
    writer.writeEndElement();
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:17,代码来源:BpmPlatformParser.java

示例3: writeJobExecutorContent

import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
protected void writeJobExecutorContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context) throws XMLStreamException {
  ModelNode node = context.getModelNode();
  ModelNode jobExecutorNode = node.get(Element.JOB_EXECUTOR.getLocalName());

  if (jobExecutorNode.isDefined()) {

    writer.writeStartElement(Element.JOB_EXECUTOR.getLocalName());

    for (Property property : jobExecutorNode.asPropertyList()) {
      ModelNode propertyValue = property.getValue();

      for (AttributeDefinition jobExecutorAttribute : SubsystemAttributeDefinitons.JOB_EXECUTOR_ATTRIBUTES) {
        if (jobExecutorAttribute.equals(SubsystemAttributeDefinitons.NAME)) {
          ((SimpleAttributeDefinition) jobExecutorAttribute).marshallAsAttribute(propertyValue, writer);
        } else {
          jobExecutorAttribute.marshallAsElement(propertyValue, writer);
        }
      }

      writeJobAcquisitionsContent(writer, context, propertyValue);
    }

    // end job-executor
    writer.writeEndElement();
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:27,代码来源:BpmPlatformParser1_1.java

示例4: writeContent

import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException {
    context.startSubsystemElement(Namespace.CURRENT.getUriString(), false);

    final ModelNode node = context.getModelNode();
    final ModelNode mbean = node.get(SmppMbeanDefinition.MBEAN);

    for (Property mbeanProp : mbean.asPropertyList()) {
        writer.writeStartElement(SmppMbeanDefinition.MBEAN);

        final ModelNode mbeanEntry = mbeanProp.getValue();

        SmppMbeanDefinition.NAME_ATTR.marshallAsAttribute(mbeanEntry, true, writer);
        SmppMbeanDefinition.TYPE_ATTR.marshallAsAttribute(mbeanEntry, true, writer);

        final ModelNode property = mbeanEntry.get(SmppMbeanPropertyDefinition.PROPERTY);
        if (property != null && property.isDefined()) {
            for (Property propertyProp : property.asPropertyList()) {
                writer.writeStartElement(SmppMbeanPropertyDefinition.PROPERTY);

                final ModelNode propertyEntry = propertyProp.getValue();

                SmppMbeanPropertyDefinition.NAME_ATTR.marshallAsAttribute(propertyEntry, true, writer);
                SmppMbeanPropertyDefinition.TYPE_ATTR.marshallAsAttribute(propertyEntry, true, writer);
                SmppMbeanPropertyDefinition.VALUE_ATTR.marshallAsAttribute(propertyEntry, true, writer);

                writer.writeEndElement();
            }
        }

        writer.writeEndElement();
    }

    writer.writeEndElement();
}
 
开发者ID:RestComm,项目名称:smpp-extensions,代码行数:39,代码来源:SmppSubsystemParser.java

示例5: writeContent

import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
@Override
public void writeContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context)
        throws XMLStreamException {
    ModelNode node = context.getModelNode();

    // <subsystem>
    context.startSubsystemElement(NestSubsystemExtension.NAMESPACE, false);
    writer.writeAttribute(NEST_ENABLED_ATTR, node.get(NEST_ENABLED_ATTR).asString());

    // our config elements
    writeElement(writer, node, NEST_NAME_ELEMENT);

    // <custom-configuration>
    writer.writeStartElement(CUSTOM_CONFIG_ELEMENT);
    ModelNode configNode = node.get(CUSTOM_CONFIG_ELEMENT);
    if (configNode != null && configNode.isDefined()) {
        for (Property property : configNode.asPropertyList()) {
            // <propery>
            writer.writeStartElement(PROPERTY_ELEMENT);
            writer.writeAttribute(Attribute.NAME.getLocalName(), property.getName());
            writer.writeAttribute(Attribute.VALUE.getLocalName(), property.getValue().asString());
            // </property>
            writer.writeEndElement();
        }
    }
    // </custom-configuration>
    writer.writeEndElement();

    // </subsystem>
    writer.writeEndElement();
}
 
开发者ID:hawkular,项目名称:hawkular-commons,代码行数:32,代码来源:NestSubsystemExtension.java

示例6: writeContent

import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException {
    context.startSubsystemElement(OpenShiftSubsystemExtension.NAMESPACE, false);

    ModelNode node = context.getModelNode();

    if(node.hasDefined(Constants.MAX_LINE_LENGTH)) {
        OpenShiftSubsystemDefinition.MAX_LINE_LENGTH.marshallAsElement(node, writer);
    }

    ModelNode metricsGroups = node.get(Constants.METRICS_GROUP);
    writeMetricsGroups(writer, metricsGroups);
    writer.writeEndElement();
}
 
开发者ID:ncdc,项目名称:jboss-openshift-metrics-module,代码行数:18,代码来源:OpenShiftSubsystemParser.java

示例7: writeContent

import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
@Override
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context)
        throws XMLStreamException {
    context.startSubsystemElement(OrderedChildResourceExtension.NAMESPACE, false);
    final ModelNode node = context.getModelNode();
    if (node.hasDefined("child")) {
        for (Property prop : node.get("child").asPropertyList()) {
            writer.writeStartElement("child");
            writer.writeAttribute("name", prop.getName());
            writer.writeEndElement();
        }
    }
    writer.writeEndElement();
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:15,代码来源:OrderedChildResourceExtension.java

示例8: writeContent

import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
@Override
public void writeContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context) throws XMLStreamException {
    context.startSubsystemElement(Namespace.CURRENT.getUriString(), false);

    ModelNode model = context.getModelNode();

    // Marshall attributes
    for (AttributeDefinition attribute : LoggingResourceDefinition.ATTRIBUTES) {
        attribute.marshallAsElement(model, false, writer);
    }

    writeContent(writer, model);

    if (model.hasDefined(LOGGING_PROFILE)) {
        final List<Property> profiles = model.get(LOGGING_PROFILE).asPropertyList();
        if (!profiles.isEmpty()) {
            writer.writeStartElement(LOGGING_PROFILES);
            for (Property profile : profiles) {
                final String name = profile.getName();
                writer.writeStartElement(LOGGING_PROFILE);
                writer.writeAttribute(Attribute.NAME.getLocalName(), name);
                writeContent(writer, profile.getValue());
                writer.writeEndElement();
            }
            writer.writeEndElement();
        }
    }
    writer.writeEndElement();
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:30,代码来源:LoggingSubsystemWriter.java

示例9: writeContent

import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException {
    context.startSubsystemElement(Namespace.CURRENT.getUriString(), false);
    ModelNode scanners = context.getModelNode();
    for (final Property list : scanners.asPropertyList()) {

        final ModelNode node = list.getValue();

        for (final Property scanner : node.asPropertyList()) {

            final String scannerName = scanner.getName();
            final ModelNode configuration = scanner.getValue();

            writer.writeEmptyElement(DEPLOYMENT_SCANNER);

            if (!DeploymentScannerExtension.DEFAULT_SCANNER_NAME.equals(scannerName)) {
                writer.writeAttribute(NAME, scannerName);
            }

            DeploymentScannerDefinition.PATH.marshallAsAttribute(configuration, writer);
            DeploymentScannerDefinition.RELATIVE_TO.marshallAsAttribute(configuration, writer);
            DeploymentScannerDefinition.SCAN_ENABLED.marshallAsAttribute(configuration, writer);
            DeploymentScannerDefinition.SCAN_INTERVAL.marshallAsAttribute(configuration, writer);
            DeploymentScannerDefinition.AUTO_DEPLOY_ZIPPED.marshallAsAttribute(configuration, writer);
            DeploymentScannerDefinition.AUTO_DEPLOY_EXPLODED.marshallAsAttribute(configuration, writer);
            DeploymentScannerDefinition.AUTO_DEPLOY_XML.marshallAsAttribute(configuration, writer);
            DeploymentScannerDefinition.DEPLOYMENT_TIMEOUT.marshallAsAttribute(configuration, writer);
        }
        writer.writeEndElement();
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:35,代码来源:DeploymentScannerParser_1_1.java

示例10: writeContent

import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException {
    context.startSubsystemElement(Namespace.CURRENT.getUriString(), false);
    ModelNode scanners = context.getModelNode();
    for (final Property list : scanners.asPropertyList()) {

        final ModelNode node = list.getValue();

        for (final Property scanner : node.asPropertyList()) {

            final String scannerName = scanner.getName();
            final ModelNode configuration = scanner.getValue();

            writer.writeEmptyElement(DEPLOYMENT_SCANNER);

            if (!DeploymentScannerExtension.DEFAULT_SCANNER_NAME.equals(scannerName)) {
                writer.writeAttribute(NAME, scannerName);
            }

            DeploymentScannerDefinition.PATH.marshallAsAttribute(configuration, writer);
            DeploymentScannerDefinition.RELATIVE_TO.marshallAsAttribute(configuration, writer);
            DeploymentScannerDefinition.SCAN_ENABLED.marshallAsAttribute(configuration, writer);
            DeploymentScannerDefinition.SCAN_INTERVAL.marshallAsAttribute(configuration, writer);
            DeploymentScannerDefinition.AUTO_DEPLOY_ZIPPED.marshallAsAttribute(configuration, writer);
            DeploymentScannerDefinition.AUTO_DEPLOY_EXPLODED.marshallAsAttribute(configuration, writer);
            DeploymentScannerDefinition.AUTO_DEPLOY_XML.marshallAsAttribute(configuration, writer);
            DeploymentScannerDefinition.DEPLOYMENT_TIMEOUT.marshallAsAttribute(configuration, writer);
            DeploymentScannerDefinition.RUNTIME_FAILURE_CAUSES_ROLLBACK.marshallAsAttribute(configuration, writer);
        }
        writer.writeEndElement();
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:36,代码来源:DeploymentScannerParser_2_0.java

示例11: writeContent

import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void writeContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context)
        throws XMLStreamException {
    context.startSubsystemElement(Namespace.CURRENT.getUriString(), false);
    ModelNode node = context.getModelNode();
    writeThreadsElement(writer, node);
    writer.writeEndElement();
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:12,代码来源:ThreadsParser.java

示例12: writeProcessEnginesContent

import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
private void writeProcessEnginesContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context) throws XMLStreamException {
  
  writer.writeStartElement(Element.PROCESS_ENGINES.getLocalName());

  ModelNode node = context.getModelNode();
  
  ModelNode processEngineConfigurations = node.get(Element.PROCESS_ENGINES.getLocalName());
  if (processEngineConfigurations.isDefined()) {
    for (Property property : processEngineConfigurations.asPropertyList()) {
      // write each child element to xml
      writer.writeStartElement(Element.PROCESS_ENGINE.getLocalName());
      
      writer.writeAttribute(Attribute.NAME.getLocalName(), property.getName());
      ModelNode entry = property.getValue();
      writeAttribute(Attribute.DEFAULT, writer, entry);
      writeElement(Element.DATASOURCE, writer, entry);
      writeElement(Element.HISTORY_LEVEL, writer, entry);
      writeElement(Element.CONFIGURATION, writer, entry);

      writeProperties(writer, entry);
      writePlugins(writer, entry);

      writer.writeEndElement();
    }
  }
  // end process-engines
  writer.writeEndElement();
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:29,代码来源:BpmPlatformParser.java

示例13: writeProcessEnginesContent

import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
protected void writeProcessEnginesContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context) throws XMLStreamException {

      writer.writeStartElement(Element.PROCESS_ENGINES.getLocalName());

      ModelNode node = context.getModelNode();

      ModelNode processEngineConfigurations = node.get(Element.PROCESS_ENGINES.getLocalName());
      if (processEngineConfigurations.isDefined()) {
        for (Property property : processEngineConfigurations.asPropertyList()) {
          // write each child element to xml
          writer.writeStartElement(Element.PROCESS_ENGINE.getLocalName());

          ModelNode propertyValue = property.getValue();
          for (AttributeDefinition processEngineAttribute : SubsystemAttributeDefinitons.PROCESS_ENGINE_ATTRIBUTES) {
            if (processEngineAttribute.equals(SubsystemAttributeDefinitons.NAME) || processEngineAttribute.equals(SubsystemAttributeDefinitons.DEFAULT)) {
              ((SimpleAttributeDefinition) processEngineAttribute).marshallAsAttribute(propertyValue, writer);
            } else {
              processEngineAttribute.marshallAsElement(propertyValue, writer);
            }
          }

          writer.writeEndElement();
        }
      }
      // end process-engines
      writer.writeEndElement();
    }
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:28,代码来源:BpmPlatformParser1_1.java

示例14: writeContent

import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
@Override
public void writeContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context) throws XMLStreamException {
    context.startSubsystemElement(Namespace.CURRENT.getUri(), false);
    ModelNode node = context.getModelNode();
    if (!node.isDefined()) {
    	return;
    }
    
    ALLOW_ENV_FUNCTION_ELEMENT.marshallAsElement(node, false, writer);
    ASYNC_THREAD_POOL_ELEMENT.marshallAsElement(node, false, writer);
    
	if (like(node, Element.BUFFER_SERVICE_ELEMENT)){
		writer.writeStartElement(Element.BUFFER_SERVICE_ELEMENT.getLocalName());
		writeBufferService(writer, node);
		writer.writeEndElement();
	}
	
	MAX_THREADS_ELEMENT.marshallAsElement(node, false, writer);
	MAX_ACTIVE_PLANS_ELEMENT.marshallAsElement(node, false, writer);
	USER_REQUEST_SOURCE_CONCURRENCY_ELEMENT.marshallAsElement(node, false, writer);
	TIME_SLICE_IN_MILLI_ELEMENT.marshallAsElement(node, false, writer);
	MAX_ROWS_FETCH_SIZE_ELEMENT.marshallAsElement(node, false, writer);
	LOB_CHUNK_SIZE_IN_KB_ELEMENT.marshallAsElement(node, false, writer);
	QUERY_THRESHOLD_IN_SECS_ELEMENT.marshallAsElement(node, false, writer);
	MAX_SOURCE_ROWS_ELEMENT.marshallAsElement(node, false, writer);
	EXCEPTION_ON_MAX_SOURCE_ROWS_ELEMENT.marshallAsElement(node, false, writer);
	DETECTING_CHANGE_EVENTS_ELEMENT.marshallAsElement(node, false, writer);
	QUERY_TIMEOUT.marshallAsElement(node, false, writer);
	WORKMANAGER.marshallAsElement(node, false, writer);

	AUTHORIZATION_VALIDATOR_MODULE_ELEMENT.marshallAsElement(node, writer);
	POLICY_DECIDER_MODULE_ELEMENT.marshallAsElement(node, writer);
	PREPARSER_MODULE_ELEMENT.marshallAsElement(node, writer);
	
	if (like(node, Element.RESULTSET_CACHE_ELEMENT)){
		writer.writeStartElement(Element.RESULTSET_CACHE_ELEMENT.getLocalName());
		writeResultsetCacheConfiguration(writer, node);
		writer.writeEndElement();
	}    	
	
	if (like(node, Element.PREPAREDPLAN_CACHE_ELEMENT)){
		writer.writeStartElement(Element.PREPAREDPLAN_CACHE_ELEMENT.getLocalName());
		writePreparedPlanCacheConfiguration(writer, node);
		writer.writeEndElement();
	}
	
	if (like(node, Element.DISTRIBUTED_CACHE)){
		writer.writeStartElement(Element.DISTRIBUTED_CACHE.getLocalName());
		writeObjectReplicatorConfiguration(writer, node);
		writer.writeEndElement();
	}
	   	
	if (has(node, Element.TRANSPORT_ELEMENT.getLocalName())) {
 	ArrayList<String> transports = new ArrayList<String>(node.get(Element.TRANSPORT_ELEMENT.getLocalName()).keys());
 	if (!transports.isEmpty()) {
 		for (String transport:transports) {
 	        writer.writeStartElement(Element.TRANSPORT_ELEMENT.getLocalName());
 	        writeTransportConfiguration(writer, node.get(Element.TRANSPORT_ELEMENT.getLocalName(), transport), transport);
 	        writer.writeEndElement();    			
 		}
 	}        
	}    	
	
	if (has(node, Element.TRANSLATOR_ELEMENT.getLocalName())) {
 	ArrayList<String> translators = new ArrayList<String>(node.get(Element.TRANSLATOR_ELEMENT.getLocalName()).keys());
 	if (!translators.isEmpty()) {
 		for (String translator:translators) {
 	        writer.writeStartElement(Element.TRANSLATOR_ELEMENT.getLocalName());
 	        writeTranslator(writer, node.get(Element.TRANSLATOR_ELEMENT.getLocalName(), translator), translator);
 	        writer.writeEndElement();    			
 		}
 	}        
	}
    writer.writeEndElement(); // End of subsystem element
}
 
开发者ID:kenweezy,项目名称:teiid,代码行数:76,代码来源:TeiidSubsystemParser.java

示例15: writeContent

import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException {
    Namespace schemaVer = Namespace.CURRENT;
    final ModelNode node = context.getModelNode();

    context.startSubsystemElement(schemaVer.getUriString(), false);
    if (node.hasDefined(CommonAttributes.EXPOSE_MODEL)) {
        ModelNode showModel = node.get(CommonAttributes.EXPOSE_MODEL);
        if (showModel.hasDefined(CommonAttributes.RESOLVED)) {
            writer.writeEmptyElement(CommonAttributes.EXPOSE_RESOLVED_MODEL);
            ExposeModelResourceResolved.DOMAIN_NAME.marshallAsAttribute(showModel.get(CommonAttributes.RESOLVED), false, writer);
            ExposeModelResourceResolved.PROPER_PROPERTY_FORMAT.marshallAsAttribute(showModel.get(CommonAttributes.RESOLVED), false, writer);
        }
        if (showModel.hasDefined(CommonAttributes.EXPRESSION)) {
            writer.writeEmptyElement(CommonAttributes.EXPOSE_EXPRESSION_MODEL);
            ExposeModelResourceExpression.DOMAIN_NAME.marshallAsAttribute(showModel.get(CommonAttributes.EXPRESSION), false, writer);
        }
    }
    if (node.hasDefined(CommonAttributes.REMOTING_CONNECTOR)) {
        writer.writeStartElement(CommonAttributes.REMOTING_CONNECTOR);
        final ModelNode resourceModel = node.get(CommonAttributes.REMOTING_CONNECTOR).get(CommonAttributes.JMX);
        RemotingConnectorResource.USE_MANAGEMENT_ENDPOINT.marshallAsAttribute(resourceModel, writer);
        writer.writeEndElement();
    }

    if (node.hasDefined(JmxAuditLoggerResourceDefinition.PATH_ELEMENT.getKey()) &&
            node.get(JmxAuditLoggerResourceDefinition.PATH_ELEMENT.getKey()).hasDefined(JmxAuditLoggerResourceDefinition.PATH_ELEMENT.getValue())) {
        ModelNode auditLog = node.get(JmxAuditLoggerResourceDefinition.PATH_ELEMENT.getKey(), JmxAuditLoggerResourceDefinition.PATH_ELEMENT.getValue());
        writer.writeStartElement(CommonAttributes.AUDIT_LOG);
        JmxAuditLoggerResourceDefinition.LOG_BOOT.marshallAsAttribute(auditLog, writer);
        JmxAuditLoggerResourceDefinition.LOG_READ_ONLY.marshallAsAttribute(auditLog, writer);
        JmxAuditLoggerResourceDefinition.ENABLED.marshallAsAttribute(auditLog, writer);

        if (auditLog.hasDefined(HANDLER) && auditLog.get(HANDLER).keys().size() > 0) {
            writer.writeStartElement(CommonAttributes.HANDLERS);
            for (String key : auditLog.get(HANDLER).keys()) {
                writer.writeEmptyElement(CommonAttributes.HANDLER);
                writer.writeAttribute(CommonAttributes.NAME, key);
            }
            writer.writeEndElement();
        }

        writer.writeEndElement();
    }
    if (node.hasDefined(JMXSubsystemRootResource.CORE_MBEAN_SENSITIVITY.getName())) {
        writer.writeStartElement(CommonAttributes.SENSITIVITY);
        JMXSubsystemRootResource.CORE_MBEAN_SENSITIVITY.marshallAsAttribute(node, writer);
        writer.writeEndElement();
    }
    writer.writeEndElement();
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:55,代码来源:JMXExtension.java


注:本文中的org.jboss.as.controller.persistence.SubsystemMarshallingContext.getModelNode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。