<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://jetty.org/configure_10_0.dtd">

<Configure id="Server" class="org.eclipse.jetty.server.Server">
  <Call name="insertHandler">
    <Arg>
      <New id="ThreadLimitHandler" class="org.eclipse.jetty.server.handler.ThreadLimitHandler">
        <Arg name="forwardedHeader"><Property name="jetty.threadlimit.forwardedHeader"/></Arg> 
        <Set name="enabled"><Property name="jetty.threadlimit.enabled" default="true"/></Set>
        <Set name="threadLimit" property="jetty.threadlimit.threadLimit"/>
        <Call name="includeMethod">
          <Arg>
            <Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit">
              <Arg><Property name="jetty.threadlimit.include.method" default="" /></Arg>
            </Call>
          </Arg>
        </Call>
        <Call name="excludeMethod">
          <Arg>
            <Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit">
              <Arg><Property name="jetty.threadlimit.exclude.method" default="" /></Arg>
            </Call>
          </Arg>
        </Call>
        <Call name="includePath">
          <Arg>
            <Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit">
              <Arg><Property name="jetty.threadlimit.include.path" default="" /></Arg>
            </Call>
          </Arg>
        </Call>
        <Call name="excludePath">
          <Arg>
            <Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit">
              <Arg><Property name="jetty.threadlimit.exclude.path" default="" /></Arg>
            </Call>
          </Arg>
        </Call>
        <Call name="includeInetAddressPattern">
          <Arg>
            <Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit">
              <Arg><Property name="jetty.threadlimit.include.inet" default="" /></Arg>
            </Call>
          </Arg>
        </Call>
        <Call name="excludeInetAddressPattern">
          <Arg>
            <Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit">
              <Arg><Property name="jetty.threadlimit.exclude.inet" default="" /></Arg>
            </Call>
          </Arg>
        </Call>
      </New>
    </Arg>
  </Call>
</Configure>
