-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved various Handler documentation
* Added and documented missing modules for QoSHandler, SizeLimitHandler and ThreadLimitHandler. * Moved SizeLimitHandler from oej.server to oej.server.handler. Signed-off-by: Simone Bordet <[email protected]>
- Loading branch information
Showing
18 changed files
with
575 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?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 class="org.eclipse.jetty.server.handler.QoSHandler"> | ||
<Set name="maxRequestCount" property="jetty.qos.maxRequestCount" /> | ||
<Set name="maxSuspendedRequestCount" property="jetty.qos.maxSuspendedRequestCount" /> | ||
<Set name="maxSuspend"> | ||
<Call class="java.time.Duration" name="ofMillis"> | ||
<Arg type="long"> | ||
<Property name="jetty.qos.maxSuspendDuration" default="0" /> | ||
</Arg> | ||
</Call> | ||
</Set> | ||
<Call name="includeMethod"> | ||
<Arg> | ||
<Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit"> | ||
<Arg><Property name="jetty.qos.include.method" default="" /></Arg> | ||
</Call> | ||
</Arg> | ||
</Call> | ||
<Call name="excludeMethod"> | ||
<Arg> | ||
<Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit"> | ||
<Arg><Property name="jetty.qos.exclude.method" default="" /></Arg> | ||
</Call> | ||
</Arg> | ||
</Call> | ||
<Call name="includePath"> | ||
<Arg> | ||
<Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit"> | ||
<Arg><Property name="jetty.qos.include.path" default="" /></Arg> | ||
</Call> | ||
</Arg> | ||
</Call> | ||
<Call name="excludePath"> | ||
<Arg> | ||
<Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit"> | ||
<Arg><Property name="jetty.qos.exclude.path" default="" /></Arg> | ||
</Call> | ||
</Arg> | ||
</Call> | ||
<Call name="includeInetAddressPattern"> | ||
<Arg> | ||
<Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit"> | ||
<Arg><Property name="jetty.qos.include.inet" default="" /></Arg> | ||
</Call> | ||
</Arg> | ||
</Call> | ||
<Call name="excludeInetAddressPattern"> | ||
<Arg> | ||
<Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit"> | ||
<Arg><Property name="jetty.qos.exclude.inet" default="" /></Arg> | ||
</Call> | ||
</Arg> | ||
</Call> | ||
</New> | ||
</Arg> | ||
</Call> | ||
</Configure> |
13 changes: 13 additions & 0 deletions
13
jetty-core/jetty-server/src/main/config/etc/jetty-size-limit.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?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 class="org.eclipse.jetty.server.handler.SizeLimitHandler"> | ||
<Arg type="long"><Property name="jetty.sizeLimit.maxRequestContentSize" default="-1" /></Arg> | ||
<Arg type="long"><Property name="jetty.sizeLimit.maxResponseContentSize" default="-1" /></Arg> | ||
</New> | ||
</Arg> | ||
</Call> | ||
</Configure> |
56 changes: 56 additions & 0 deletions
56
jetty-core/jetty-server/src/main/config/etc/jetty-thread-limit.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?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> |
20 changes: 0 additions & 20 deletions
20
jetty-core/jetty-server/src/main/config/etc/jetty-threadlimit.xml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ server | |
server | ||
|
||
[after] | ||
threadlimit | ||
thread-limit | ||
|
||
[xml] | ||
etc/jetty-delayed.xml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
[description] | ||
Installs QoSHandler at the root of the `Handler` tree, | ||
to limit the number of concurrent requests, for resource management. | ||
|
||
[tags] | ||
server | ||
|
||
[before] | ||
compression | ||
gzip | ||
|
||
[depends] | ||
server | ||
|
||
[xml] | ||
etc/jetty-qos.xml | ||
|
||
[ini-template] | ||
#tag::documentation[] | ||
## The maximum number of concurrent requests allowed; use 0 for a default | ||
## value calculated from the ThreadPool configuration or the number of CPU cores. | ||
# jetty.qos.maxRequestCount=0 | ||
|
||
## The maximum number of requests that may be suspended. | ||
# jetty.qos.maxSuspendedRequestCount=1024 | ||
|
||
## The maximum duration that a request may remain suspended, in milliseconds; use 0 for unlimited time. | ||
# jetty.qos.maxSuspendDuration=0 | ||
|
||
## A comma-separated list of HTTP methods to include when matching a request. | ||
# jetty.qos.include.method= | ||
|
||
## A comma-separated list of HTTP methods to exclude when matching a request. | ||
# jetty.qos.exclude.method= | ||
|
||
## A comma-separated list of URI path patterns to include when matching a request. | ||
# jetty.qos.include.path= | ||
|
||
## A comma-separated list of URI path patterns to exclude when matching a request. | ||
# jetty.qos.exclude.path= | ||
|
||
## A comma-separated list of remote addresses patterns to include when matching a request. | ||
# jetty.qos.include.inet= | ||
|
||
## A comma-separated list of remote addresses patterns to exclude when matching a request. | ||
# jetty.qos.exclude.inet= | ||
#end::documentation[] |
Oops, something went wrong.