Skip to content

Migrating from QoSFilter to QoSHandler #12999

Answered by sbordet
jmbeach asked this question in Q&A
Discussion options

You must be logged in to vote

Are you configuring each QoSFilter differently?

You can achieve the same (a chain of QoSHandlers) because QoSHandler is-a ConditionalHandler, see https://jetty.org/docs/jetty/12/programming-guide/server/http.html#handler-use-conditional.

Basically you do this:

QoSHandler qos1 = new QoSHandler();
qos1.include("/foo/*"); // Only match these paths.

QoSHandler qos2 = new QoSHandler(qos1);
qos2.include("/bar/*"); // Only match these paths.

You get the idea.

If you don't need to configure QoSHandler differently, you can include() many paths on the same QoSHandler instance.

Also, take a look at using include(PathSpec) with PathSpec.from() as you will be able to use either Servlet-style path spe…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jmbeach
Comment options

Answer selected by sbordet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants