private void generate(CacheServer bridge) throws SAXException {
    if (version.compareTo(CacheXmlVersion.GEMFIRE_4_0) < 0) {
      return;
    }
    AttributesImpl atts = new AttributesImpl();
    try {
      if (generateDefaults() || bridge.getPort() != CacheServer.DEFAULT_PORT) {
        atts.addAttribute("", "", PORT, "", String.valueOf(bridge.getPort()));
      }

      if (version.compareTo(CacheXmlVersion.GEMFIRE_4_1) < 0) {
        return;
      }
      if (generateDefaults()
          || bridge
              .getMaximumTimeBetweenPings() != CacheServer.DEFAULT_MAXIMUM_TIME_BETWEEN_PINGS) {
        atts.addAttribute("", "", MAXIMUM_TIME_BETWEEN_PINGS, "",
            String.valueOf(bridge.getMaximumTimeBetweenPings()));
      }

      if (generateDefaults()
          || bridge.getNotifyBySubscription() != CacheServer.DEFAULT_NOTIFY_BY_SUBSCRIPTION) {
        atts.addAttribute("", "", NOTIFY_BY_SUBSCRIPTION, "",
            String.valueOf(bridge.getNotifyBySubscription()));
      }

      if (generateDefaults()
          || bridge.getSocketBufferSize() != CacheServer.DEFAULT_SOCKET_BUFFER_SIZE) {
        atts.addAttribute("", "", SOCKET_BUFFER_SIZE, "",
            String.valueOf(bridge.getSocketBufferSize()));
      }

      if (version.compareTo(CacheXmlVersion.GEMFIRE_5_0) < 0) {
        return;
      }

      if (generateDefaults() || bridge.getMaxConnections() != CacheServer.DEFAULT_MAX_CONNECTIONS) {
        atts.addAttribute("", "", MAX_CONNECTIONS, "", String.valueOf(bridge.getMaxConnections()));
      }

      if (version.compareTo(CacheXmlVersion.GEMFIRE_5_1) < 0) {
        return;
      }

      if (generateDefaults() || bridge.getMaxThreads() != CacheServer.DEFAULT_MAX_THREADS) {
        atts.addAttribute("", "", MAX_THREADS, "", String.valueOf(bridge.getMaxThreads()));
      }
      if (generateDefaults()
          || bridge.getMaximumMessageCount() != CacheServer.DEFAULT_MAXIMUM_MESSAGE_COUNT) {
        atts.addAttribute("", "", MAXIMUM_MESSAGE_COUNT, "",
            String.valueOf(bridge.getMaximumMessageCount()));
      }

      if (generateDefaults()
          || bridge.getMessageTimeToLive() != CacheServer.DEFAULT_MESSAGE_TIME_TO_LIVE) {
        atts.addAttribute("", "", MESSAGE_TIME_TO_LIVE, "",
            String.valueOf(bridge.getMessageTimeToLive()));
      }

      if (version.compareTo(CacheXmlVersion.GEMFIRE_5_7) < 0) {
        return;
      }

      if (bridge.getBindAddress() != null) {
        if (generateDefaults()
            || !CacheServer.DEFAULT_BIND_ADDRESS.equals(bridge.getBindAddress())) {
          atts.addAttribute("", "", BIND_ADDRESS, "", bridge.getBindAddress());
        }
      }

      if (bridge.getHostnameForClients() != null && !bridge.getHostnameForClients().equals("")) {
        atts.addAttribute("", "", HOSTNAME_FOR_CLIENTS, "", bridge.getHostnameForClients());
      }
      if (generateDefaults()
          || bridge.getLoadPollInterval() != CacheServer.DEFAULT_LOAD_POLL_INTERVAL) {
        atts.addAttribute("", "", LOAD_POLL_INTERVAL, "",
            String.valueOf(bridge.getLoadPollInterval()));
      }

      if (version.compareTo(CacheXmlVersion.GEMFIRE_8_0) < 0) {
        return;
      }

      if (generateDefaults() || bridge.getTcpNoDelay() != CacheServer.DEFAULT_TCP_NO_DELAY) {
        atts.addAttribute("", "", TCP_NO_DELAY, "", "" + bridge.getTcpNoDelay());
      }

    } finally {
      if (version.compareTo(CacheXmlVersion.GEMFIRE_5_7) >= 0) {
        handler.startElement("", CACHE_SERVER, CACHE_SERVER, atts);
      } else {
        handler.startElement("", BRIDGE_SERVER, BRIDGE_SERVER, atts);
      }

      if (version.compareTo(CacheXmlVersion.GEMFIRE_5_7) >= 0) {
        String[] groups = bridge.getGroups();
        if (groups.length > 0) {
          for (String group : groups) {
            handler.startElement("", GROUP, GROUP, EMPTY);
            handler.characters(group.toCharArray(), 0, group.length());
            handler.endElement("", GROUP, GROUP);
          }
        }

        if (!bridge.getClientSubscriptionConfig().getEvictionPolicy().equals("none")) {
          generateClientHaQueue(bridge);
        }

        ServerLoadProbe probe = bridge.getLoadProbe();
        if (generateDefaults() || !probe.equals(CacheServer.DEFAULT_LOAD_PROBE)) {
          generate(LOAD_PROBE, probe);
        }
      }
      if (version.compareTo(CacheXmlVersion.GEMFIRE_5_7) >= 0) {
        handler.endElement("", "", CACHE_SERVER);
      } else {
        handler.endElement("", "", BRIDGE_SERVER);
      }
    }
  }
Generates XML for the given cache server

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