private void generateGatewayReceiver(Cache cache) throws SAXException {
    Set<GatewayReceiver> receiverList = cache.getGatewayReceivers();
    for (GatewayReceiver receiver : receiverList) {
      AttributesImpl atts = new AttributesImpl();
      try {
        // hostnameForSenders
        if (generateDefaults() || receiver.getHostnameForSenders() != null) {
          atts.addAttribute("", "", HOSTNAME_FOR_SENDERS, "", receiver.getHostnameForSenders());
        }
        // start port
        if (generateDefaults() || receiver.getStartPort() != GatewayReceiver.DEFAULT_START_PORT) {
          atts.addAttribute("", "", START_PORT, "", String.valueOf(receiver.getStartPort()));
        }
        // end port
        if (generateDefaults() || receiver.getEndPort() != GatewayReceiver.DEFAULT_END_PORT) {
          atts.addAttribute("", "", END_PORT, "", String.valueOf(receiver.getEndPort()));
        }
        // bind-address
        if (generateDefaults() || (receiver.getBindAddress() != null
            && !receiver.getBindAddress().equals(GatewayReceiver.DEFAULT_BIND_ADDRESS))) {
          atts.addAttribute("", "", BIND_ADDRESS, "", receiver.getBindAddress());
        }
        // maximum-time-between-pings
        if (generateDefaults() || receiver
            .getMaximumTimeBetweenPings() != GatewayReceiver.DEFAULT_MAXIMUM_TIME_BETWEEN_PINGS) {
          atts.addAttribute("", "", MAXIMUM_TIME_BETWEEN_PINGS, "",
              String.valueOf(receiver.getMaximumTimeBetweenPings()));
        }
        // socket-buffer-size
        if (generateDefaults()
            || receiver.getSocketBufferSize() != GatewayReceiver.DEFAULT_SOCKET_BUFFER_SIZE) {
          atts.addAttribute("", "", SOCKET_BUFFER_SIZE, "",
              String.valueOf(receiver.getSocketBufferSize()));
        }

        if (version.compareTo(CacheXmlVersion.GEMFIRE_8_0) < 0) {
          return;
        }
        // manual-start
        if (generateDefaults()
            || receiver.isManualStart() != GatewayReceiver.DEFAULT_MANUAL_START) {
          atts.addAttribute("", "", MANUAL_START, "", String.valueOf(receiver.isManualStart()));
        }

      } finally {
        handler.startElement("", GATEWAY_RECEIVER, GATEWAY_RECEIVER, atts);
        for (GatewayTransportFilter gsf : receiver.getGatewayTransportFilters()) {
          generateGatewayTransportFilter(gsf);
        }
        handler.endElement("", GATEWAY_RECEIVER, GATEWAY_RECEIVER);
      }
    }
  }
Generates XML for a DynamicRegionFactory.Config

@since GemFire 4.3
geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlGenerator.java