private void generateGatewaySender(GatewaySender sender) throws SAXException {
    AttributesImpl atts = new AttributesImpl();
    // id
    atts.addAttribute("", "", ID, "", sender.getId());
    // remote-distributed-system
    atts.addAttribute("", "", REMOTE_DISTRIBUTED_SYSTEM_ID, "",
        String.valueOf(sender.getRemoteDSId()));
    // parallel
    if (generateDefaults() || sender.isParallel() != GatewaySender.DEFAULT_IS_PARALLEL) {
      atts.addAttribute("", "", PARALLEL, "", String.valueOf(sender.isParallel()));
    }
    // manual-start
    if (generateDefaults() || sender.isManualStart() != GatewaySender.DEFAULT_MANUAL_START) {
      atts.addAttribute("", "", MANUAL_START, "", String.valueOf(sender.isManualStart()));
    }
    // socket-buffer-size
    if (generateDefaults()
        || sender.getSocketBufferSize() != GatewaySender.DEFAULT_SOCKET_BUFFER_SIZE) {
      atts.addAttribute("", "", SOCKET_BUFFER_SIZE, "",
          String.valueOf(sender.getSocketBufferSize()));
    }
    // socket-read-timeout
    if (generateDefaults()
        || sender.getSocketReadTimeout() != GatewaySender.DEFAULT_SOCKET_READ_TIMEOUT) {
      atts.addAttribute("", "", SOCKET_READ_TIMEOUT, "",
          String.valueOf(sender.getSocketReadTimeout()));
    }
    // enable-batch-conflation
    if (generateDefaults()
        || sender.isBatchConflationEnabled() != GatewaySender.DEFAULT_BATCH_CONFLATION) {
      atts.addAttribute("", "", ENABLE_BATCH_CONFLATION, "",
          String.valueOf(sender.isBatchConflationEnabled())); // Should we use ENABLE-CONFLATION
    }
    // batch-size
    if (generateDefaults() || sender.getBatchSize() != GatewaySender.DEFAULT_BATCH_SIZE) {
      atts.addAttribute("", "", BATCH_SIZE, "", String.valueOf(sender.getBatchSize()));
    }
    // batch-time-interval
    if (generateDefaults()
        || sender.getBatchTimeInterval() != GatewaySender.DEFAULT_BATCH_TIME_INTERVAL) {
      atts.addAttribute("", "", BATCH_TIME_INTERVAL, "",
          String.valueOf(sender.getBatchTimeInterval()));
    }
    // enable-persistence
    if (generateDefaults()
        || sender.isPersistenceEnabled() != GatewaySender.DEFAULT_PERSISTENCE_ENABLED) {
      atts.addAttribute("", "", ENABLE_PERSISTENCE, "",
          String.valueOf(sender.isPersistenceEnabled()));
    }
    // disk-store-name
    if (generateDefaults()
        || sender.getDiskStoreName() != null && !sender.getDiskStoreName().equals("")) {
      atts.addAttribute("", "", DISK_STORE_NAME, "", String.valueOf(sender.getDiskStoreName()));
    }
    // disk-synchronous
    if (generateDefaults()
        || sender.isDiskSynchronous() != GatewaySender.DEFAULT_DISK_SYNCHRONOUS) {
      atts.addAttribute("", "", DISK_SYNCHRONOUS, "", String.valueOf(sender.isDiskSynchronous()));
    }
    // maximum-queue-memory
    if (generateDefaults()
        || sender.getMaximumQueueMemory() != GatewaySender.DEFAULT_MAXIMUM_QUEUE_MEMORY) {
      atts.addAttribute("", "", MAXIMUM_QUEUE_MEMORY, "",
          String.valueOf(sender.getMaximumQueueMemory()));
    }
    // alert-threshold
    if (generateDefaults() || sender.getAlertThreshold() != GatewaySender.DEFAULT_ALERT_THRESHOLD) {
      atts.addAttribute("", "", ALERT_THRESHOLD, "", String.valueOf(sender.getAlertThreshold()));
    }

    // dispatcher-threads
    if (generateDefaults()
        || sender.getDispatcherThreads() != GatewaySender.DEFAULT_DISPATCHER_THREADS) {
      atts.addAttribute("", "", DISPATCHER_THREADS, "",
          String.valueOf(sender.getDispatcherThreads()));
    }
    // order-policy
    if (sender.getOrderPolicy() != null) {
      if (generateDefaults()
          || !sender.getOrderPolicy().equals(GatewaySender.DEFAULT_ORDER_POLICY)) {
        atts.addAttribute("", "", ORDER_POLICY, "", String.valueOf(sender.getOrderPolicy()));
      }
    }

    // group-transaction-events
    if (version.compareTo(CacheXmlVersion.GEODE_1_0) >= 0) {
      if (generateDefaults()
          || sender
              .mustGroupTransactionEvents() != GatewaySender.DEFAULT_MUST_GROUP_TRANSACTION_EVENTS) {
        atts.addAttribute("", "", GROUP_TRANSACTION_EVENTS, "",
            String.valueOf(sender.mustGroupTransactionEvents()));
      }
    }

    // enforce-threads-connect-same-receiver
    if (version.compareTo(CacheXmlVersion.GEODE_1_0) >= 0) {
      if (generateDefaults()
          || sender
              .getEnforceThreadsConnectSameReceiver() != GatewaySender.DEFAULT_ENFORCE_THREADS_CONNECT_SAME_RECEIVER) {
        atts.addAttribute("", "", ENFORCE_THREADS_CONNECT_SAME_RECEIVER, "",
            String.valueOf(sender.getEnforceThreadsConnectSameReceiver()));
      }
    }

    handler.startElement("", GATEWAY_SENDER, GATEWAY_SENDER, atts);

    for (GatewayEventFilter gef : sender.getGatewayEventFilters()) {
      generateGatewayEventFilter(gef);
    }

    if (version.compareTo(CacheXmlVersion.GEMFIRE_8_0) >= 0) {
      if (sender.getGatewayEventSubstitutionFilter() != null) {
        generateGatewayEventSubstitutionFilter(sender.getGatewayEventSubstitutionFilter());
      }
    }

    for (GatewayTransportFilter gsf : sender.getGatewayTransportFilters()) {
      generateGatewayTransportFilter(gsf);
    }

    handler.endElement("", GATEWAY_SENDER, GATEWAY_SENDER);
  }
Generates XML for a DynamicRegionFactory.Config

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