docs: @Override
      public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException {
          context.startSubsystemElement(JGroupsSchema.CURRENT.getNamespaceUri(), false);
          ModelNode model = context.getModelNode();
  
          if (model.isDefined()) {
              if (model.hasDefined(ChannelResourceDefinition.WILDCARD_PATH.getKey())) {
                  writer.writeStartElement(Element.CHANNELS.getLocalName());
                  JGroupsSubsystemResourceDefinition.DEFAULT_CHANNEL.marshallAsAttribute(model, writer);
                  for (Property property: model.get(ChannelResourceDefinition.WILDCARD_PATH.getKey()).asPropertyList()) {
                      writer.writeStartElement(Element.CHANNEL.getLocalName());
                      writer.writeAttribute(Attribute.NAME.getLocalName(), property.getName());
                      ModelNode channel = property.getValue();
                      writeAttribute(writer, channel, ChannelResourceDefinition.STACK);
                      writeAttribute(writer, channel, ChannelResourceDefinition.MODULE);
  
                      if (channel.hasDefined(ForkResourceDefinition.WILDCARD_PATH.getKey())) {
                          for (Property forkProperty: channel.get(ForkResourceDefinition.WILDCARD_PATH.getKey()).asPropertyList()) {
                              writer.writeStartElement(Element.FORK.getLocalName());
                              writer.writeAttribute(Attribute.NAME.getLocalName(), forkProperty.getName());
                              ModelNode fork = forkProperty.getValue();
                              if (fork.hasDefined(ProtocolResourceDefinition.WILDCARD_PATH.getKey())) {
                                  for (Property protocol: fork.get(ProtocolResourceDefinition.WILDCARD_PATH.getKey()).asPropertyList()) {
                                      writeProtocol(writer, protocol);
                                  }
                              }
                              writer.writeEndElement();
                          }
                      }
                      writer.writeEndElement();
                  }
                  writer.writeEndElement();
              }
              if (model.hasDefined(StackResourceDefinition.WILDCARD_PATH.getKey())) {
                  writer.writeStartElement(Element.STACKS.getLocalName());
                  writeAttribute(writer, model, JGroupsSubsystemResourceDefinition.DEFAULT_STACK);
                  for (Property property: model.get(StackResourceDefinition.WILDCARD_PATH.getKey()).asPropertyList()) {
                      writer.writeStartElement(Element.STACK.getLocalName());
                      writer.writeAttribute(Attribute.NAME.getLocalName(), property.getName());
                      ModelNode stack = property.getValue();
                      if (stack.hasDefined(TransportResourceDefinition.WILDCARD_PATH.getKey())) {
                          writeTransport(writer, stack.get(TransportResourceDefinition.WILDCARD_PATH.getKey()).asProperty());
                      }
                      if (stack.hasDefined(ProtocolResourceDefinition.WILDCARD_PATH.getKey())) {
                          for (Property protocol: stack.get(ProtocolResourceDefinition.WILDCARD_PATH.getKey()).asPropertyList()) {
                              writeProtocol(writer, protocol);
                          }
                      }
                      if (stack.get(RelayResourceDefinition.PATH.getKeyValuePair()).isDefined()) {
                          writeRelay(writer, stack.get(RelayResourceDefinition.PATH.getKeyValuePair()));
                      }
                      if (stack.get(SaslResourceDefinition.PATH.getKeyValuePair()).isDefined()) {
                          writeSasl(writer, stack.get(SaslResourceDefinition.PATH.getKeyValuePair()));
                      }
                      writer.writeEndElement();
                  }
                  writer.writeEndElement();
              }
          }
          writer.writeEndElement();
      }