* {@inheritDoc}
*/
@Override
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException {
context.startSubsystemElement(Namespace.CURRENT.getUriString(), false);
final ModelNode model = context.getModelNode();
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
writer.writeStartElement(Element.OUTBOUND_CONNECTIONS.getLocalName());
if (model.hasDefined(OUTBOUND_CONNECTION)) {
final List<Property> outboundConnections = model.get(OUTBOUND_CONNECTION).asPropertyList();
for (Property property : outboundConnections) {
final String connectionName = property.getName();
// get the specific outbound-connection
final ModelNode genericOutboundConnectionModel = property.getValue();
// process and write outbound connection
this.writeOutboundConnection(writer, connectionName, genericOutboundConnectionModel);
}
}
if (model.hasDefined(REMOTE_OUTBOUND_CONNECTION)) {
final List<Property> remoteOutboundConnections = model.get(REMOTE_OUTBOUND_CONNECTION).asPropertyList();
for (Property property : remoteOutboundConnections) {
final String connectionName = property.getName();
// get the specific remote outbound connection
final ModelNode remoteOutboundConnectionModel = property.getValue();
// process and write remote outbound connection
this.writeRemoteOutboundConnection(writer, connectionName, remoteOutboundConnectionModel);
}
}
if (model.hasDefined(LOCAL_OUTBOUND_CONNECTION)) {
final List<Property> localOutboundConnections = model.get(LOCAL_OUTBOUND_CONNECTION).asPropertyList();
for (Property property : localOutboundConnections) {
final String connectionName = property.getName();
// get the specific local outbound connection
final ModelNode localOutboundConnectionModel = property.getValue();
// process and write local outbound connection
this.writeLocalOutboundConnection(writer, connectionName, localOutboundConnectionModel);
}
}