Invoked after the header matched the {@code Request} headers to apply the rule's logic.
*
- * @param input the input {@code Request} and {@code Processor}
+ * @param input the input {@code Request} and {@code Handler}
* @param value the header value
- * @return the possibly wrapped {@code Request} and {@code Processor}
+ * @return the possibly wrapped {@code Request} and {@code Handler}
* @throws IOException if applying the rule failed
*/
- protected abstract Processor apply(Processor input, String value) throws IOException;
+ protected abstract Handler apply(Handler input, String value) throws IOException;
@Override
public String toString()
diff --git a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/InvalidURIRule.java b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/InvalidURIRule.java
index 7923c3b05b31..71a069e76cb3 100644
--- a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/InvalidURIRule.java
+++ b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/InvalidURIRule.java
@@ -74,7 +74,7 @@ public void setMessage(String message)
}
@Override
- public Processor matchAndApply(Processor input) throws IOException
+ public Handler matchAndApply(Handler input) throws IOException
{
String path = input.getHttpURI().getDecodedPath();
@@ -90,12 +90,12 @@ public Processor matchAndApply(Processor input) throws IOException
return null;
}
- private Processor apply(Processor input)
+ private Handler apply(Handler input)
{
- return new Processor(input)
+ return new Handler(input)
{
@Override
- public boolean process(Response response, Callback callback)
+ public boolean handle(Response response, Callback callback)
{
String message = getMessage();
if (StringUtil.isBlank(message))
diff --git a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/PatternRule.java b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/PatternRule.java
index b4e27ca1b425..45a55a285b87 100644
--- a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/PatternRule.java
+++ b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/PatternRule.java
@@ -45,7 +45,7 @@ public void setPattern(String pattern)
}
@Override
- public Processor matchAndApply(Processor input) throws IOException
+ public Handler matchAndApply(Handler input) throws IOException
{
if (ServletPathSpec.match(_pattern, input.getHttpURI().getPath()))
return apply(input);
@@ -55,11 +55,11 @@ public Processor matchAndApply(Processor input) throws IOException
/**
* Invoked after the Servlet pattern matched the URI path to apply the rule's logic.
*
- * @param input the input {@code Request} and {@code Processor}
- * @return the possibly wrapped {@code Request} and {@code Processor}
+ * @param input the input {@code Request} and {@code Handler}
+ * @return the possibly wrapped {@code Request} and {@code Handler}
* @throws IOException if applying the rule failed
*/
- protected abstract Processor apply(Processor input) throws IOException;
+ protected abstract Handler apply(Handler input) throws IOException;
@Override
public String toString()
diff --git a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RedirectPatternRule.java b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RedirectPatternRule.java
index 976a354b1265..e5f26239dc02 100644
--- a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RedirectPatternRule.java
+++ b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RedirectPatternRule.java
@@ -77,12 +77,12 @@ public void setStatusCode(int statusCode)
}
@Override
- public Processor apply(Processor input) throws IOException
+ public Handler apply(Handler input) throws IOException
{
- return new Processor(input)
+ return new Handler(input)
{
@Override
- public boolean process(Response response, Callback callback)
+ public boolean handle(Response response, Callback callback)
{
String location = getLocation();
response.setStatus(getStatusCode());
diff --git a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RedirectRegexRule.java b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RedirectRegexRule.java
index 1eff98f6e302..ed2069217067 100644
--- a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RedirectRegexRule.java
+++ b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RedirectRegexRule.java
@@ -76,12 +76,12 @@ public void setStatusCode(int statusCode)
}
@Override
- protected Processor apply(Processor input, Matcher matcher) throws IOException
+ protected Handler apply(Handler input, Matcher matcher) throws IOException
{
- return new Processor(input)
+ return new Handler(input)
{
@Override
- public boolean process(Response response, Callback callback)
+ public boolean handle(Response response, Callback callback)
{
String target = matcher.replaceAll(getLocation());
response.setStatus(_statusCode);
diff --git a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RegexRule.java b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RegexRule.java
index 5225407caebd..ff743667c910 100644
--- a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RegexRule.java
+++ b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RegexRule.java
@@ -52,7 +52,7 @@ public void setRegex(String regex)
}
@Override
- public Processor matchAndApply(Processor input) throws IOException
+ public Handler matchAndApply(Handler input) throws IOException
{
String target = input.getHttpURI().getPathQuery();
Matcher matcher = _regex.matcher(target);
@@ -64,12 +64,12 @@ public Processor matchAndApply(Processor input) throws IOException
/**
* Invoked after the regular expression matched the URI path to apply the rule's logic.
*
- * @param input the input {@code Request} and {@code Processor}
+ * @param input the input {@code Request} and {@code Handler}
* @param matcher the {@code Matcher} that matched the request path, with capture groups available for replacement.
- * @return the possibly wrapped {@code Request} and {@code Processor}
+ * @return the possibly wrapped {@code Request} and {@code Handler}
* @throws IOException if applying the rule failed
*/
- protected abstract Processor apply(Processor input, Matcher matcher) throws IOException;
+ protected abstract Handler apply(Handler input, Matcher matcher) throws IOException;
@Override
public String toString()
diff --git a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/ResponsePatternRule.java b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/ResponsePatternRule.java
index 5611c082fa53..4f4d88bbd85e 100644
--- a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/ResponsePatternRule.java
+++ b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/ResponsePatternRule.java
@@ -75,15 +75,15 @@ public void setMessage(String message)
}
@Override
- public Processor apply(Processor input) throws IOException
+ public Handler apply(Handler input) throws IOException
{
if (getCode() < HttpStatus.CONTINUE_100)
return null;
- return new Processor(input)
+ return new Handler(input)
{
@Override
- public boolean process(Response response, Callback callback)
+ public boolean handle(Response response, Callback callback)
{
String message = getMessage();
if (StringUtil.isBlank(message))
diff --git a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RewriteHandler.java b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RewriteHandler.java
index 0d48b08f9eae..76a51ef11147 100644
--- a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RewriteHandler.java
+++ b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RewriteHandler.java
@@ -105,20 +105,20 @@ public void setOriginalPathAttribute(String originalPathAttribute)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if (!isStarted())
return false;
- Rule.Processor input = new Rule.Processor(request);
- Rule.Processor output = _rules.matchAndApply(input);
+ Rule.Handler input = new Rule.Handler(request);
+ Rule.Handler output = _rules.matchAndApply(input);
// No rule matched, call super with the original request.
if (output == null)
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
// At least one rule matched, call super with the result of the rule applications.
- output.setProcessor(getHandler());
- return output.process(output, response, callback);
+ output.setHandler(getHandler());
+ return output.handle(output, response, callback);
}
}
diff --git a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RewritePatternRule.java b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RewritePatternRule.java
index 81a1953065ac..b178583d34d9 100644
--- a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RewritePatternRule.java
+++ b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RewritePatternRule.java
@@ -63,7 +63,7 @@ public void setReplacement(String replacement)
}
@Override
- public Processor apply(Processor input) throws IOException
+ public Handler apply(Handler input) throws IOException
{
HttpURI httpURI = input.getHttpURI();
String newQuery = URIUtil.addQueries(httpURI.getQuery(), _query);
@@ -71,7 +71,7 @@ public Processor apply(Processor input) throws IOException
HttpURI newURI = HttpURI.build(httpURI, newPath, httpURI.getParam(), newQuery);
if (LOG.isDebugEnabled())
LOG.debug("rewriting {} to {}", httpURI, newURI);
- return new HttpURIProcessor(input, newURI);
+ return new HttpURIHandler(input, newURI);
}
@Override
diff --git a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RewriteRegexRule.java b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RewriteRegexRule.java
index 3efd5a390e52..e63275cdaa9b 100644
--- a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RewriteRegexRule.java
+++ b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RewriteRegexRule.java
@@ -48,13 +48,13 @@ public void setReplacement(String replacement)
}
@Override
- public Processor apply(Processor input, Matcher matcher) throws IOException
+ public Handler apply(Handler input, Matcher matcher) throws IOException
{
HttpURI httpURI = input.getHttpURI();
String replacedPath = matcher.replaceAll(replacement);
HttpURI newURI = HttpURI.build(httpURI, replacedPath);
- return new HttpURIProcessor(input, newURI);
+ return new HttpURIHandler(input, newURI);
}
@Override
diff --git a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/Rule.java b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/Rule.java
index 06e6aff522d1..b5d63da369e4 100644
--- a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/Rule.java
+++ b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/Rule.java
@@ -22,7 +22,7 @@
/**
* An abstract rule that, upon matching a certain condition, may wrap
- * the {@code Request} or the {@code Processor} to execute custom logic.
+ * the {@code Request} or the {@code Handler} to execute custom logic.
*/
public abstract class Rule
{
@@ -31,14 +31,14 @@ public abstract class Rule
/**
* Tests whether the given {@code Request} should apply, and if so the rule logic is triggered.
*
- * @param input the input {@code Request} and {@code Processor}
- * @return the possibly wrapped {@code Request} and {@code Processor}, or {@code null} if the rule did not match
+ * @param input the input {@code Request} and {@code Handler}
+ * @return the possibly wrapped {@code Request} and {@code Handler}, or {@code null} if the rule did not match
* @throws IOException if applying the rule failed
*/
- public abstract Processor matchAndApply(Processor input) throws IOException;
+ public abstract Handler matchAndApply(Handler input) throws IOException;
/**
- * @return when {@code true}, rules after this one are not processed
+ * @return when {@code true}, rules after this one are not invoked
*/
public boolean isTerminating()
{
@@ -60,61 +60,61 @@ public String toString()
}
/**
- * A {@link Request.Wrapper} that is also a {@link org.eclipse.jetty.server.Request.Processor},
+ *
A {@link Request.Wrapper} that is also a {@link Handler},
* used to chain a sequence of {@link Rule}s together.
- * The rule processor is initialized with the initial request, then it is
+ * The rule handler is initialized with the initial request, then it is
* passed to a chain of rules before the child {@code Handler} is
- * passed in {@link #setProcessor(Processor)}. Finally, the response
- * and callback are provided in a call to {@link #process(Request, Response, Callback)},
- * which calls the {@link #process(Response, Callback)}.
+ * passed in {@link #setHandler(Handler)}. Finally, the response
+ * and callback are provided in a call to {@link #handle(Request, Response, Callback)},
+ * which calls the {@link #handle(Response, Callback)}.
*/
- public static class Processor extends Request.Wrapper implements Request.Processor
+ public static class Handler extends Request.Wrapper implements Request.Handler
{
- private volatile Processor _processor;
+ private volatile Handler _handler;
- public Processor(Request request)
+ public Handler(Request request)
{
super(request);
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
- return process(response, callback);
+ return handle(response, callback);
}
/**
- * Processes this wrapped request together with the passed response and
- * callback, using the processor set in {@link #setProcessor(Processor)}.
- * This method should be extended if additional processing of the wrapped
+ *
Handles this wrapped request together with the passed response and
+ * callback, using the handler set in {@link #setHandler(Handler)}.
+ * This method should be extended if additional handling of the wrapped
* request is required.
* @param response The response
* @param callback The callback
- * @throws Exception If there is a problem processing
- * @see #setProcessor(Processor)
+ * @throws Exception If there is a problem handling
+ * @see #setHandler(Handler)
*/
- protected boolean process(Response response, Callback callback) throws Exception
+ protected boolean handle(Response response, Callback callback) throws Exception
{
- Processor processor = _processor;
- return processor != null && processor.process(this, response, callback);
+ Handler handler = _handler;
+ return handler != null && handler.handle(this, response, callback);
}
/**
- * Wraps the given {@code Processor} within this instance and returns this instance.
+ * Wraps the given {@code Handler} within this instance and returns this instance.
*
- * @param processor the {@code Processor} to wrap
+ * @param handler the {@code Handler} to wrap
*/
- public void setProcessor(Processor processor)
+ public void setHandler(Handler handler)
{
- _processor = processor;
+ _handler = handler;
}
}
- public static class HttpURIProcessor extends Processor
+ public static class HttpURIHandler extends Handler
{
private final HttpURI _uri;
- public HttpURIProcessor(Request request, HttpURI uri)
+ public HttpURIHandler(Request request, HttpURI uri)
{
super(request);
_uri = uri;
diff --git a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RuleContainer.java b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RuleContainer.java
index 50b88f0c221b..b4173baf6f96 100644
--- a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RuleContainer.java
+++ b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RuleContainer.java
@@ -98,12 +98,12 @@ public void setOriginalPathAttribute(String originalPathAttribute)
/**
* Processes the rules.
*
- * @param input the input {@code Request} and {@code Processor}
- * @return a {@code Request} and {@code Processor}, possibly wrapped by rules to implement the rule's logic,
+ * @param input the input {@code Request} and {@code Handler}
+ * @return a {@code Request} and {@code Handler}, possibly wrapped by rules to implement the rule's logic,
* or {@code null} if no rule matched
*/
@Override
- public Processor matchAndApply(Processor input) throws IOException
+ public Handler matchAndApply(Handler input) throws IOException
{
String originalPathAttribute = getOriginalPathAttribute();
if (originalPathAttribute != null)
@@ -120,7 +120,7 @@ public Processor matchAndApply(Processor input) throws IOException
{
if (LOG.isDebugEnabled())
LOG.debug("applying {}", rule);
- Processor output = rule.matchAndApply(input);
+ Handler output = rule.matchAndApply(input);
if (output == null)
{
if (LOG.isDebugEnabled())
diff --git a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/TerminatingPatternRule.java b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/TerminatingPatternRule.java
index 70893e102c78..a9ebe3af646e 100644
--- a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/TerminatingPatternRule.java
+++ b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/TerminatingPatternRule.java
@@ -37,7 +37,7 @@ public boolean isTerminating()
}
@Override
- protected Processor apply(Processor input) throws IOException
+ protected Handler apply(Handler input) throws IOException
{
return input;
}
diff --git a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/TerminatingRegexRule.java b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/TerminatingRegexRule.java
index 7a46f93e0465..eaac04eb0dbf 100644
--- a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/TerminatingRegexRule.java
+++ b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/TerminatingRegexRule.java
@@ -40,7 +40,7 @@ public boolean isTerminating()
}
@Override
- public Processor apply(Processor input, Matcher matcher) throws IOException
+ public Handler apply(Handler input, Matcher matcher) throws IOException
{
return input;
}
diff --git a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/VirtualHostRuleContainer.java b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/VirtualHostRuleContainer.java
index bb0421d12d34..744bdf7e43cc 100644
--- a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/VirtualHostRuleContainer.java
+++ b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/VirtualHostRuleContainer.java
@@ -55,7 +55,7 @@ public void addVirtualHost(String virtualHost)
}
@Override
- public Processor matchAndApply(Processor input) throws IOException
+ public Handler matchAndApply(Handler input) throws IOException
{
if (_virtualHosts.isEmpty())
return super.matchAndApply(input);
diff --git a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/CompactPathRuleTest.java b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/CompactPathRuleTest.java
index 55f85bea0914..0db94f89d9d8 100644
--- a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/CompactPathRuleTest.java
+++ b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/CompactPathRuleTest.java
@@ -57,7 +57,7 @@ public void testCompactPathRule(String inputPath, String inputQuery, String expe
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
Content.Sink.write(response, true, request.getHttpURI().getPathQuery(), callback);
return true;
diff --git a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/CookiePatternRuleTest.java b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/CookiePatternRuleTest.java
index 628d42728898..544b932b5487 100644
--- a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/CookiePatternRuleTest.java
+++ b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/CookiePatternRuleTest.java
@@ -40,7 +40,7 @@ private void start(CookiePatternRule rule) throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.getHeaders().put(HttpHeader.CONTENT_TYPE, "text/plain;charset=utf-8");
Content.Sink.write(response, false, "pathInContext=%s%n".formatted(Request.getPathInContext(request)), Callback.NOOP);
diff --git a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/ForceRequestHeaderValueRuleTest.java b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/ForceRequestHeaderValueRuleTest.java
index 3fef3756bb4a..69db1e7d5b8e 100644
--- a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/ForceRequestHeaderValueRuleTest.java
+++ b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/ForceRequestHeaderValueRuleTest.java
@@ -37,7 +37,7 @@ public void start(ForceRequestHeaderValueRule rule) throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.getHeaders().put(HttpHeader.CONTENT_TYPE, "text/plain;charset=utf-8");
for (HttpField httpField : request.getHeaders())
diff --git a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/ForwardedSchemeHeaderRuleTest.java b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/ForwardedSchemeHeaderRuleTest.java
index 496273d4e387..4525f40f13a0 100644
--- a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/ForwardedSchemeHeaderRuleTest.java
+++ b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/ForwardedSchemeHeaderRuleTest.java
@@ -30,7 +30,7 @@ public void start(ForwardedSchemeHeaderRule rule) throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.getHeaders().put("request-scheme", request.getHttpURI().getScheme());
callback.succeeded();
diff --git a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/HeaderPatternRuleTest.java b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/HeaderPatternRuleTest.java
index 63dc6351f8d1..b55233066f44 100644
--- a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/HeaderPatternRuleTest.java
+++ b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/HeaderPatternRuleTest.java
@@ -32,7 +32,7 @@ private void start(HeaderPatternRule rule) throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
callback.succeeded();
return true;
diff --git a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/HeaderRegexRuleTest.java b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/HeaderRegexRuleTest.java
index 628eceec443f..846ea6158482 100644
--- a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/HeaderRegexRuleTest.java
+++ b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/HeaderRegexRuleTest.java
@@ -33,7 +33,7 @@ private void start(HeaderRegexRule rule) throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
callback.succeeded();
return true;
diff --git a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/InvalidURIRuleTest.java b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/InvalidURIRuleTest.java
index a6850936ec2b..6b4ce753bad2 100644
--- a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/InvalidURIRuleTest.java
+++ b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/InvalidURIRuleTest.java
@@ -33,7 +33,7 @@ private void start(InvalidURIRule rule) throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
callback.succeeded();
return true;
diff --git a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/PatternRuleTest.java b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/PatternRuleTest.java
index bc05ac983154..f98b3476b811 100644
--- a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/PatternRuleTest.java
+++ b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/PatternRuleTest.java
@@ -104,7 +104,7 @@ private void start(PatternRule rule) throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
callback.succeeded();
return true;
@@ -158,7 +158,7 @@ private TestPatternRule(String pattern)
}
@Override
- public Processor apply(Processor input)
+ public Handler apply(Handler input)
{
_applied = true;
return input;
diff --git a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RedirectPatternRuleTest.java b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RedirectPatternRuleTest.java
index bf126d284ed2..5a47e710bf8f 100644
--- a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RedirectPatternRuleTest.java
+++ b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RedirectPatternRuleTest.java
@@ -32,7 +32,7 @@ private void start(RedirectPatternRule rule) throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
callback.succeeded();
return true;
diff --git a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RedirectRegexRuleTest.java b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RedirectRegexRuleTest.java
index d106f6b68bc6..cff51e53e9c0 100644
--- a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RedirectRegexRuleTest.java
+++ b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RedirectRegexRuleTest.java
@@ -32,7 +32,7 @@ private void start(RedirectRegexRule rule) throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
callback.succeeded();
return true;
diff --git a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RegexRuleTest.java b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RegexRuleTest.java
index 828427450178..094c6e2b7ca9 100644
--- a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RegexRuleTest.java
+++ b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RegexRuleTest.java
@@ -71,7 +71,7 @@ private void start(RegexRule rule) throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
callback.succeeded();
return true;
@@ -125,7 +125,7 @@ public TestRegexRule(String pattern)
}
@Override
- public Processor apply(Processor input, Matcher matcher)
+ public Handler apply(Handler input, Matcher matcher)
{
_applied = true;
return input;
diff --git a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/ResponsePatternRuleTest.java b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/ResponsePatternRuleTest.java
index 89feb5f81c50..834dadef82a8 100644
--- a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/ResponsePatternRuleTest.java
+++ b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/ResponsePatternRuleTest.java
@@ -33,7 +33,7 @@ private void start(ResponsePatternRule rule) throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
callback.succeeded();
return true;
diff --git a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RewriteHandlerTest.java b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RewriteHandlerTest.java
index f925f5d191ac..c1d5c04c8fd4 100644
--- a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RewriteHandlerTest.java
+++ b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RewriteHandlerTest.java
@@ -40,7 +40,7 @@ public void init() throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.setStatus(HttpStatus.OK_200);
response.getHeaders().put("X-Path", request.getHttpURI().getPath());
diff --git a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RewritePatternRuleTest.java b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RewritePatternRuleTest.java
index 25ca6667e15e..fa3f7370a619 100644
--- a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RewritePatternRuleTest.java
+++ b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RewritePatternRuleTest.java
@@ -49,7 +49,7 @@ private void start(RewritePatternRule rule) throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.getHeaders().put("X-URI", request.getHttpURI().getPathQuery());
callback.succeeded();
diff --git a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RewriteRegexRuleTest.java b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RewriteRegexRuleTest.java
index b72d42a4e19b..a583a6a81110 100644
--- a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RewriteRegexRuleTest.java
+++ b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/RewriteRegexRuleTest.java
@@ -73,7 +73,7 @@ private void start(RewriteRegexRule rule) throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
HttpURI httpURI = request.getHttpURI();
response.getHeaders().put("X-Path", httpURI.getPath());
diff --git a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/TerminatingPatternRuleTest.java b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/TerminatingPatternRuleTest.java
index 5d466a2f07f2..45607d272ca8 100644
--- a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/TerminatingPatternRuleTest.java
+++ b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/TerminatingPatternRuleTest.java
@@ -41,7 +41,7 @@ public void init() throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.setStatus(HttpStatus.CREATED_201);
callback.succeeded();
diff --git a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/TerminatingRegexRuleTest.java b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/TerminatingRegexRuleTest.java
index 4219c6cb3c8c..f9b03d772790 100644
--- a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/TerminatingRegexRuleTest.java
+++ b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/TerminatingRegexRuleTest.java
@@ -41,7 +41,7 @@ public void init() throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.setStatus(HttpStatus.CREATED_201);
callback.succeeded();
diff --git a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/VirtualHostRuleContainerTest.java b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/VirtualHostRuleContainerTest.java
index fd69634ce229..5e42ddf95803 100644
--- a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/VirtualHostRuleContainerTest.java
+++ b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/VirtualHostRuleContainerTest.java
@@ -39,7 +39,7 @@ public void init() throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.getHeaders().put("X-Path", request.getHttpURI().getPath());
callback.succeeded();
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Context.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Context.java
index 78f5e6878c1c..196d78927981 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Context.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Context.java
@@ -23,7 +23,7 @@
import org.eclipse.jetty.util.resource.Resource;
/**
- * A Context for handling/processing a request.
+ * A Context for handling a request.
* Every request will always have a non-null context, which may initially be the Server context, or
* a context provided by a ContextHandler.
*
@@ -45,7 +45,7 @@ public interface Context extends Attributes, Decorator, Executor
Resource getBaseResource();
- Request.Processor getErrorProcessor();
+ Request.Handler getErrorHandler();
List getVirtualHosts();
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Handler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Handler.java
index f22746fec91b..0b528f65404d 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Handler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Handler.java
@@ -30,7 +30,7 @@
/**
* A Jetty component that handles HTTP requests, of any version (HTTP/1.1, HTTP/2 or HTTP/3).
- * A {@code Handler} is a {@link Request.Processor} with the addition of {@link LifeCycle}
+ * A {@code Handler} is a {@link Request.Handler} with the addition of {@link LifeCycle}
* behaviours, plus variants that allow organizing {@code Handler}s as a tree structure.
* {@code Handler}s may wrap the {@link Request}, {@link Response} and/or {@link Callback} and
* then forward the wrapped instances to their children, so that they see a modified request;
@@ -38,7 +38,7 @@
* response; and/or to intercept the completion of the callback.
*
A {@code Handler} is an {@link Invocable} and implementations must respect
* the {@link InvocationType} they declare within calls to
- * {@link #process(Request, Response, Callback)}.
+ * {@link #handle(Request, Response, Callback)}.
* A {@link Handler.Container} that contains a list of other {@code Handler}s that are
- * tried in sequence by {@link #process(Request, Response, Callback)}.
+ * tried in sequence by {@link #handle(Request, Response, Callback)}.
*/
class Sequence extends AbstractContainer implements Collection
{
@@ -658,11 +658,11 @@ public Sequence(boolean dynamic, List handlers)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
for (Handler h : _handlers)
{
- if (h.process(request, response, callback))
+ if (h.handle(request, response, callback))
return true;
}
return false;
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java
index 60609813182f..03dd5bb17637 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java
@@ -36,7 +36,7 @@
import org.eclipse.jetty.http.MetaData;
import org.eclipse.jetty.http.Trailers;
import org.eclipse.jetty.io.Content;
-import org.eclipse.jetty.server.handler.ErrorProcessor;
+import org.eclipse.jetty.server.handler.ErrorHandler;
import org.eclipse.jetty.server.internal.HttpChannelState;
import org.eclipse.jetty.util.Attributes;
import org.eclipse.jetty.util.Callback;
@@ -51,7 +51,7 @@
* The representation of an HTTP request, for any protocol version (HTTP/1.1, HTTP/2, HTTP/3).
* The typical idiom to read request content is the following:
* {@code
- * public boolean process(Request request, Response response, Callback callback)
+ * public boolean handle(Request request, Response response, Callback callback)
* {
* // Reject requests not appropriate for this handler.
* if (!request.getHttpURI().getPath().startsWith("/yourPath"))
@@ -63,7 +63,7 @@
* if (chunk == null)
* {
* // The chunk is not currently available, demand to be called back.
- * request.demand(() -> process(request, response, callback));
+ * request.demand(() -> handle(request, response, callback));
* return true;
* }
*
@@ -72,7 +72,7 @@
* Throwable failure = error.getCause();
*
* // Handle errors.
- * // Mark the processing as complete, either generating a custom
+ * // Mark the handling as complete, either generating a custom
* // response and succeeding the callback, or failing the callback.
* callback.failed(failure);
* return true;
@@ -86,7 +86,7 @@
*
* // Generate a response.
*
- * // Mark the processing as complete.
+ * // Mark the handling as complete.
* callback.succeeded();
*
* return true;
@@ -102,7 +102,7 @@
* {
* // Generate a response.
*
- * // Mark the processing as complete.
+ * // Mark the handling as complete.
* callback.succeeded();
*
* return true;
@@ -254,7 +254,7 @@ default void push(MetaData.Request resource)
* Adds a listener for asynchronous errors.
* The listener is a predicate function that should return {@code true} to indicate
* that the function has completed (either successfully or with a failure) the callback
- * received from {@link Handler#process(Request, Response, Callback)}, or
+ * received from {@link org.eclipse.jetty.server.Handler#handle(Request, Response, Callback)}, or
* {@code false} otherwise.
* Listeners are processed in sequence, and the first that returns {@code true}
* stops the processing of subsequent listeners, which are therefore not invoked.
@@ -494,24 +494,24 @@ static String toRedirectURI(Request request, String location)
}
/**
- * A processor for an HTTP request and response.
- * The processing typically involves reading the request content (if any) and producing a response.
+ * A handler for an HTTP request and response.
+ * The handling typically involves reading the request content (if any) and producing a response.
*/
@FunctionalInterface
- interface Processor extends Invocable
+ interface Handler extends Invocable
{
/**
- * Invoked to process the passed HTTP request and response.
- * The request is accepted by returning true, then processing must be concluded by
- * completing the passed callback. The processing may be asynchronous, i.e. this method may return true and
+ *
Invoked to handle the passed HTTP request and response.
+ * The request is accepted by returning true, then handling must be concluded by
+ * completing the passed callback. The handling may be asynchronous, i.e. this method may return true and
* complete the given callback later, possibly from a different thread. If this method returns false,
* then the callback must not be invoked and any mutation on the response reversed.
- * Exceptions thrown by this method are processed by an {@link ErrorProcessor},
+ *
Exceptions thrown by this method may be subsequently handled by an {@link ErrorHandler},
* if present, otherwise a default HTTP 500 error is generated and the
* callback completed while writing the error response.
* The simplest implementation is:
*
- * public boolean process(Request request, Response response, Callback callback)
+ * public boolean handle(Request request, Response response, Callback callback)
* {
* callback.succeeded();
* return true;
@@ -519,23 +519,23 @@ interface Processor extends Invocable
*
* A HelloWorld implementation is:
*
- * public boolean process(Request request, Response response, Callback callback)
+ * public boolean handle(Request request, Response response, Callback callback)
* {
* response.write(true, ByteBuffer.wrap("Hello World\n".getBytes(StandardCharsets.UTF_8)), callback);
* return true;
* }
*
*
- * @param request the HTTP request to process
- * @param response the HTTP response to process
- * @param callback the callback to complete when the processing is complete
- * @return True if an only if the request will be processed, a response generated and the callback eventually called.
+ * @param request the HTTP request to handle
+ * @param response the HTTP response to handle
+ * @param callback the callback to complete when the handling is complete
+ * @return True if an only if the request will be handled, a response generated and the callback eventually called.
* This may occur within the scope of the call to this method, or asynchronously some time later. If false
* is returned, then this method must not generate a response, nor complete the callback.
- * @throws Exception if there is a failure during the processing. Catchers cannot assume that the callback will be
+ * @throws Exception if there is a failure during the handling. Catchers cannot assume that the callback will be
* called and thus should attempt to complete the request as if a false had been returned.
*/
- boolean process(Request request, Response response, Callback callback) throws Exception;
+ boolean handle(Request request, Response response, Callback callback) throws Exception;
}
/**
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java
index 2d694bbb5c32..f7b0bd0c90eb 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java
@@ -504,12 +504,11 @@ private boolean welcome(Request request, Response response, Callback callback) t
if (welcomeAction == null)
return false;
- welcomeActionProcess(request, response, callback, welcomeAction);
+ handleWelcomeAction(request, response, callback, welcomeAction);
return true;
}
- // TODO: could use a better name
- protected void welcomeActionProcess(Request request, Response response, Callback callback, WelcomeAction welcomeAction) throws IOException
+ protected void handleWelcomeAction(Request request, Response response, Callback callback, WelcomeAction welcomeAction) throws IOException
{
switch (welcomeAction.type)
{
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Response.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Response.java
index c5853f84bc2e..fe8470da110c 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Response.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Response.java
@@ -32,7 +32,7 @@
import org.eclipse.jetty.http.Trailers;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.io.QuietException;
-import org.eclipse.jetty.server.handler.ErrorProcessor;
+import org.eclipse.jetty.server.handler.ErrorHandler;
import org.eclipse.jetty.server.internal.HttpChannelState;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.StringUtil;
@@ -277,15 +277,15 @@ else if (cause != null)
response.setStatus(status);
- // TODO: detect recursion when an ErrorProcessor calls this method, otherwise StackOverflowError.
+ // TODO: detect recursion when an ErrorHandler calls this method, otherwise StackOverflowError.
Context context = request.getContext();
- Request.Processor errorProcessor = context.getErrorProcessor();
- if (errorProcessor != null)
+ Request.Handler errorHandler = context.getErrorHandler();
+ if (errorHandler != null)
{
- Request errorRequest = new ErrorProcessor.ErrorRequest(request, status, message, cause);
+ Request errorRequest = new ErrorHandler.ErrorRequest(request, status, message, cause);
try
{
- if (errorProcessor.process(errorRequest, response, callback))
+ if (errorHandler.handle(errorRequest, response, callback))
return;
}
catch (Exception e)
@@ -296,7 +296,7 @@ else if (cause != null)
}
// fall back to very empty error page
- response.getHeaders().put(ErrorProcessor.ERROR_CACHE_CONTROL);
+ response.getHeaders().put(ErrorHandler.ERROR_CACHE_CONTROL);
response.write(true, null, callback);
}
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Server.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Server.java
index deec05757c6c..152cb935a008 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Server.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Server.java
@@ -39,7 +39,7 @@
import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.server.handler.ContextHandler;
-import org.eclipse.jetty.server.handler.ErrorProcessor;
+import org.eclipse.jetty.server.handler.ErrorHandler;
import org.eclipse.jetty.util.Attributes;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.DecoratedObjectFactory;
@@ -86,7 +86,7 @@ public class Server extends Handler.Wrapper implements Attributes
private boolean _dumpAfterStart;
private boolean _dumpBeforeStop;
private Handler _defaultHandler;
- private Request.Processor _errorProcessor;
+ private Request.Handler _errorHandler;
private RequestLog _requestLog;
private boolean _dryRun;
private volatile DateField _dateField;
@@ -154,7 +154,7 @@ public Handler getDefaultHandler()
}
/**
- * @param defaultHandler The handler to use if no other handler is set or has processed the request. This handler should
+ * @param defaultHandler The handler to use if no other handler is set or has handled the request. This handler should
* always accept the request, even if only to send a 404.
*/
public void setDefaultHandler(Handler defaultHandler)
@@ -167,10 +167,10 @@ public void setDefaultHandler(Handler defaultHandler)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
// Handle either with normal handler or default handler
- return super.process(request, response, callback) || _defaultHandler != null && _defaultHandler.process(request, response, callback);
+ return super.handle(request, response, callback) || _defaultHandler != null && _defaultHandler.handle(request, response, callback);
}
public String getServerInfo()
@@ -271,9 +271,9 @@ public RequestLog getRequestLog()
return _requestLog;
}
- public Request.Processor getErrorProcessor()
+ public Request.Handler getErrorHandler()
{
- return _errorProcessor;
+ return _errorHandler;
}
public void setRequestLog(RequestLog requestLog)
@@ -282,10 +282,10 @@ public void setRequestLog(RequestLog requestLog)
_requestLog = requestLog;
}
- public void setErrorProcessor(Request.Processor errorProcessor)
+ public void setErrorHandler(Request.Handler errorHandler)
{
- updateBean(_errorProcessor, errorProcessor);
- _errorProcessor = errorProcessor;
+ updateBean(_errorHandler, errorHandler);
+ _errorHandler = errorHandler;
}
@ManagedAttribute("version of this server")
@@ -498,8 +498,8 @@ protected void doStart() throws Exception
//Start a thread waiting to receive "stop" commands.
ShutdownMonitor.getInstance().start(); // initialize
- if (_errorProcessor == null)
- setErrorProcessor(new DynamicErrorProcessor());
+ if (_errorHandler == null)
+ setErrorHandler(new DynamicErrorHandler());
String gitHash = Jetty.GIT_HASH;
String timestamp = Jetty.BUILD_TIMESTAMP;
@@ -648,8 +648,8 @@ protected void doStop() throws Exception
multiException = ExceptionUtil.combine(multiException, e);
}
- if (getErrorProcessor() instanceof DynamicErrorProcessor)
- setErrorProcessor(null);
+ if (getErrorHandler() instanceof DynamicErrorHandler)
+ setErrorHandler(null);
if (getStopAtShutdown())
ShutdownThread.deregister(this);
@@ -825,7 +825,7 @@ public DateField(long seconds, HttpField dateField)
}
}
- private static class DynamicErrorProcessor extends ErrorProcessor {}
+ private static class DynamicErrorHandler extends ErrorHandler {}
class ServerContext extends Attributes.Wrapper implements Context
{
@@ -887,9 +887,9 @@ public void execute(Runnable runnable)
}
@Override
- public Request.Processor getErrorProcessor()
+ public Request.Handler getErrorHandler()
{
- return Server.this.getErrorProcessor();
+ return Server.this.getErrorHandler();
}
@Override
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/AbstractLatencyRecordingHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/AbstractLatencyRecordingHandler.java
index e1d91cab8fc6..e202a82677ea 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/AbstractLatencyRecordingHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/AbstractLatencyRecordingHandler.java
@@ -74,10 +74,10 @@ private void fireOnRequestComplete(long begin)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
request.addHttpStreamWrapper(this::recordingWrapper);
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
/**
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/BufferedResponseHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/BufferedResponseHandler.java
index b61043aaa898..b93bbd2f6e4f 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/BufferedResponseHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/BufferedResponseHandler.java
@@ -124,7 +124,7 @@ protected boolean shouldBuffer(Response response, boolean last)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
Handler next = getHandler();
if (next == null)
@@ -138,7 +138,7 @@ public boolean process(Request request, Response response, Callback callback) th
{
if (LOG.isDebugEnabled())
LOG.debug("{} excluded by method {}", this, request);
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
// If not a supported path this URI is always excluded.
@@ -147,7 +147,7 @@ public boolean process(Request request, Response response, Callback callback) th
{
if (LOG.isDebugEnabled())
LOG.debug("{} excluded by path {}", this, request);
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
// If the mime type is known from the path then apply mime type filtering.
@@ -161,12 +161,12 @@ public boolean process(Request request, Response response, Callback callback) th
LOG.debug("{} excluded by path suffix mime type {}", this, request);
// handle normally
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
}
BufferedResponse bufferedResponse = new BufferedResponse(request, response, callback);
- return next.process(request, bufferedResponse, bufferedResponse);
+ return next.handle(request, bufferedResponse, bufferedResponse);
}
private class BufferedResponse extends Response.Wrapper implements Callback
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ConnectHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ConnectHandler.java
index 84c54d18772c..240b7eca66de 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ConnectHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ConnectHandler.java
@@ -183,7 +183,7 @@ protected SelectorManager newSelectorManager()
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if (HttpMethod.CONNECT.is(request.getMethod()))
{
@@ -204,7 +204,7 @@ public boolean process(Request request, Response response, Callback callback) th
return true;
}
}
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
/**
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java
index dbc9b8d20f68..932ee10e7032 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java
@@ -121,7 +121,7 @@ public static String getServerInfo()
private boolean _rootContext = true;
private Resource _baseResource;
private ClassLoader _classLoader;
- private Request.Processor _errorProcessor;
+ private Request.Handler _errorHandler;
private boolean _allowNullPathInContext;
private Index _protectedTargets = Index.empty(false);
private final List _aliasChecks = new CopyOnWriteArrayList<>();
@@ -763,7 +763,7 @@ public void destroy()
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
Handler handler = getHandler();
if (handler == null || !isStarted())
@@ -780,13 +780,13 @@ public boolean process(Request request, Response response, Callback callback) th
if (!isAvailable())
{
- processUnavailable(request, response, callback);
+ handleUnavailable(request, response, callback);
return true;
}
if (pathInContext.length() == 0 && !getAllowNullPathInContext())
{
- processMovedPermanently(request, response, callback);
+ handleMovedPermanently(request, response, callback);
return true;
}
@@ -796,7 +796,7 @@ public boolean process(Request request, Response response, Callback callback) th
if (contextRequest == null)
return false;
- if (processByContextHandler(pathInContext, contextRequest, response, callback))
+ if (handleByContextHandler(pathInContext, contextRequest, response, callback))
return true;
// Past this point we are calling the downstream handler in scope.
@@ -804,7 +804,7 @@ public boolean process(Request request, Response response, Callback callback) th
ContextResponse contextResponse = wrapResponse(contextRequest, response);
try
{
- return handler.process(contextRequest, contextResponse, callback);
+ return handler.handle(contextRequest, contextResponse, callback);
}
catch (Throwable t)
{
@@ -813,18 +813,18 @@ public boolean process(Request request, Response response, Callback callback) th
}
finally
{
- // We exit scope here, even though process is asynchronous, as we have wrapped
- // all our callbacks to re-enter the scope.
+ // We exit scope here, even though handle() is asynchronous,
+ // as we have wrapped all our callbacks to re-enter the scope.
exitScope(contextRequest, request.getContext(), lastLoader);
}
}
- protected boolean processByContextHandler(String pathInContext, ContextRequest request, Response response, Callback callback)
+ protected boolean handleByContextHandler(String pathInContext, ContextRequest request, Response response, Callback callback)
{
return false;
}
- protected void processMovedPermanently(Request request, Response response, Callback callback)
+ protected void handleMovedPermanently(Request request, Response response, Callback callback)
{
String location = _contextPath + "/";
if (request.getHttpURI().getParam() != null)
@@ -837,7 +837,7 @@ protected void processMovedPermanently(Request request, Response response, Callb
callback.succeeded();
}
- protected void processUnavailable(Request request, Response response, Callback callback)
+ protected void handleUnavailable(Request request, Response response, Callback callback)
{
Response.writeError(request, response, callback, HttpStatus.SERVICE_UNAVAILABLE_503, null);
}
@@ -923,21 +923,21 @@ public void setBaseResourceAsString(String base)
/**
* @return Returns the errorHandler.
*/
- @ManagedAttribute("The error processor to use for the context")
- public Request.Processor getErrorProcessor()
+ @ManagedAttribute("The error handler to use for the context")
+ public Request.Handler getErrorHandler()
{
// TODO, do we need to wrap this so that we can establish the context
// Classloader? Or will the caller already do that?
- return _errorProcessor;
+ return _errorHandler;
}
/**
- * @param errorProcessor The error processor to set.
+ * @param errorHandler The error handler to set.
*/
- public void setErrorProcessor(Request.Processor errorProcessor)
+ public void setErrorHandler(Request.Handler errorHandler)
{
- updateBean(_errorProcessor, errorProcessor, true);
- _errorProcessor = errorProcessor;
+ updateBean(_errorHandler, errorHandler, true);
+ _errorHandler = errorHandler;
}
protected ContextRequest wrapRequest(Request request, Response response)
@@ -1149,12 +1149,12 @@ public Object getAttribute(String name)
}
@Override
- public Request.Processor getErrorProcessor()
+ public Request.Handler getErrorHandler()
{
- Request.Processor processor = ContextHandler.this.getErrorProcessor();
- if (processor == null)
- processor = getServer().getErrorProcessor();
- return processor;
+ Request.Handler handler = ContextHandler.this.getErrorHandler();
+ if (handler == null)
+ handler = getServer().getErrorHandler();
+ return handler;
}
@Override
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandlerCollection.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandlerCollection.java
index fe0ffba40978..b03c35ea1e64 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandlerCollection.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandlerCollection.java
@@ -132,7 +132,7 @@ protected List newHandlers(List handlers)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
List handlers = getHandlers();
@@ -140,13 +140,13 @@ public boolean process(Request request, Response response, Callback callback) th
return false;
if (!(handlers instanceof Mapping))
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
Mapping mapping = (Mapping)getHandlers();
// handle only a single context.
if (handlers.size() == 1)
- return handlers.get(0).process(request, response, callback);
+ return handlers.get(0).handle(request, response, callback);
// handle many contexts
Index> pathBranches = mapping._pathBranches;
@@ -156,7 +156,7 @@ public boolean process(Request request, Response response, Callback callback) th
String path = Request.getPathInContext(request);
if (!path.startsWith("/"))
{
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
int limit = path.length() - 1;
@@ -176,7 +176,7 @@ public boolean process(Request request, Response response, Callback callback) th
{
try
{
- if (branch.getHandler().process(request, response, callback))
+ if (branch.getHandler().handle(request, response, callback))
return true;
}
catch (Throwable t)
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/DebugHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/DebugHandler.java
index 3450ce17ca2f..a797fa1df5af 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/DebugHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/DebugHandler.java
@@ -42,7 +42,7 @@ public class DebugHandler extends Handler.Wrapper implements Connection.Listener
private PrintStream _print;
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
Thread thread = Thread.currentThread();
String name = thread.getName() + ":" + request.getHttpURI();
@@ -56,7 +56,7 @@ public boolean process(Request request, Response response, Callback callback) th
"; " + request.getHeaders().get("User-Agent"));
thread.setName(name);
- return getHandler().process(request, response, callback);
+ return getHandler().handle(request, response, callback);
}
catch (Throwable x)
{
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/DefaultHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/DefaultHandler.java
index e9ca86bfd0fb..1888b5e9f75e 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/DefaultHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/DefaultHandler.java
@@ -113,7 +113,7 @@ private void initFavIcon()
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
String method = request.getMethod();
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/DelayedHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/DelayedHandler.java
index 69b19962ba83..1efd4dfe3897 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/DelayedHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/DelayedHandler.java
@@ -39,7 +39,7 @@
public class DelayedHandler extends Handler.Wrapper
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
Handler next = getHandler();
if (next == null)
@@ -81,7 +81,7 @@ public boolean process(Request request, Response response, Callback callback) th
MimeTypes.Type mimeType = MimeTypes.getBaseType(contentType);
DelayedProcess delayed = newDelayedProcess(contentExpected, contentType, mimeType, next, request, response, callback);
if (delayed == null)
- return next.process(request, response, callback);
+ return next.handle(request, response, callback);
delayed.delay();
return true;
@@ -149,7 +149,7 @@ protected void process()
{
try
{
- if (!getHandler().process(getRequest(), getResponse(), getCallback()))
+ if (!getHandler().handle(getRequest(), getResponse(), getCallback()))
Response.writeError(getRequest(), getResponse(), getCallback(), HttpStatus.NOT_FOUND_404);
}
catch (Throwable t)
@@ -181,7 +181,7 @@ protected void delay()
RewindChunkRequest request = new RewindChunkRequest(getRequest(), chunk);
try
{
- getHandler().process(request, getResponse(), getCallback());
+ getHandler().handle(request, getResponse(), getCallback());
}
catch (Throwable x)
{
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ErrorProcessor.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ErrorHandler.java
similarity index 96%
rename from jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ErrorProcessor.java
rename to jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ErrorHandler.java
index 329a108c6b8e..81ec4e76b1cb 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ErrorProcessor.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ErrorHandler.java
@@ -54,14 +54,14 @@
/**
* Handler for Error pages
- * An ErrorHandler is registered with {@link Server#setErrorProcessor(Request.Processor)}.
+ * An ErrorHandler is registered with {@link Server#setErrorHandler(Request.Handler)}.
* It is called by the {@link Response#writeError(Request, Response, Callback, int, String)}
* to generate an error page.
*/
-public class ErrorProcessor implements Request.Processor
+public class ErrorHandler implements Request.Handler
{
// TODO This classes API needs to be majorly refactored/cleanup in jetty-10
- private static final Logger LOG = LoggerFactory.getLogger(ErrorProcessor.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ErrorHandler.class);
public static final String ERROR_STATUS = "org.eclipse.jetty.server.error_status";
public static final String ERROR_MESSAGE = "org.eclipse.jetty.server.error_message";
public static final String ERROR_EXCEPTION = "org.eclipse.jetty.server.error_exception";
@@ -74,7 +74,7 @@ public class ErrorProcessor implements Request.Processor
boolean _showMessageInTitle = true;
HttpField _cacheControl = new PreEncodedHttpField(HttpHeader.CACHE_CONTROL, "must-revalidate,no-cache,no-store");
- public ErrorProcessor()
+ public ErrorHandler()
{
}
@@ -84,7 +84,7 @@ public boolean errorPageForMethod(String method)
}
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
if (_cacheControl != null)
response.getHeaders().put(_cacheControl);
@@ -516,14 +516,14 @@ protected void write(Writer writer, String string) throws IOException
writer.write(StringUtil.sanitizeXmlString(string));
}
- public static Request.Processor getErrorProcessor(Server server, ContextHandler context)
+ public static Request.Handler getErrorHandler(Server server, ContextHandler context)
{
- Request.Processor errorProcessor = null;
+ Request.Handler errorHandler = null;
if (context != null)
- errorProcessor = context.getErrorProcessor();
- if (errorProcessor == null && server != null)
- errorProcessor = server.getErrorProcessor();
- return errorProcessor;
+ errorHandler = context.getErrorHandler();
+ if (errorHandler == null && server != null)
+ errorHandler = server.getErrorHandler();
+ return errorHandler;
}
public static class ErrorRequest extends Request.Wrapper
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/GracefulHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/GracefulHandler.java
index 6e5233aa8d18..5719d19663cd 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/GracefulHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/GracefulHandler.java
@@ -63,7 +63,7 @@ public boolean isShutdown()
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
Handler handler = getHandler();
if (handler == null || !isStarted())
@@ -84,7 +84,7 @@ public boolean process(Request request, Response response, Callback callback) th
try
{
- boolean handled = super.process(request, response, shutdownCallback);
+ boolean handled = super.handle(request, response, shutdownCallback);
if (!handled)
shutdownCallback.decrement();
return handled;
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/HotSwapHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/HotSwapHandler.java
index 74cf03515f95..3455cd50f156 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/HotSwapHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/HotSwapHandler.java
@@ -86,10 +86,10 @@ public void setHandler(Handler handler)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
Handler next = _handler;
- return next != null && next.process(request, response, callback);
+ return next != null && next.handle(request, response, callback);
}
@Override
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/IdleTimeoutHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/IdleTimeoutHandler.java
index 28bb848a788a..e7a4d10c002a 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/IdleTimeoutHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/IdleTimeoutHandler.java
@@ -65,11 +65,11 @@ public void setIdleTimeoutMs(long idleTimeoutMs)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
long idleTimeout = 0; // TODO rq.getHttpChannel().getIdleTimeout();
// TODO rq.getHttpChannel().setIdleTimeout(_idleTimeoutMs);
- return super.process(request, response, Callback.from(callback, () ->
+ return super.handle(request, response, Callback.from(callback, () ->
{
// TODO rq.getHttpChannel().setIdleTimeout(idleTimeout)
}));
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/InetAccessHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/InetAccessHandler.java
index 24ab88a3e008..1c385b546204 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/InetAccessHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/InetAccessHandler.java
@@ -208,7 +208,7 @@ public void excludeConnectors(String... names)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
SocketAddress socketAddress = request.getConnectionMetaData().getRemoteSocketAddress();
if (socketAddress instanceof InetSocketAddress inetSocketAddress && !isAllowed(inetSocketAddress.getAddress(), request))
@@ -217,7 +217,7 @@ public boolean process(Request request, Response response, Callback callback) th
Response.writeError(request, response, callback, HttpStatus.FORBIDDEN_403);
return true;
}
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
/**
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/MovedContextHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/MovedContextHandler.java
index 3572fe7fcb7f..5d35b42ed227 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/MovedContextHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/MovedContextHandler.java
@@ -150,7 +150,7 @@ public void setCacheControl(String cacheControl)
private class Redirector extends Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
String redirectURI = getRedirectURI();
if (redirectURI == null)
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/PathMappingsHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/PathMappingsHandler.java
index 8da30e5e8a78..1d42269d6c41 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/PathMappingsHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/PathMappingsHandler.java
@@ -80,7 +80,7 @@ public void dump(Appendable out, String indent) throws IOException
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
String pathInContext = Request.getPathInContext(request);
MatchedResource matchedResource = mappings.getMatched(pathInContext);
@@ -92,6 +92,6 @@ public boolean process(Request request, Response response, Callback callback) th
}
if (LOG.isDebugEnabled())
LOG.debug("Matched pathInContext of {} to {} -> {}", pathInContext, matchedResource.getPathSpec(), matchedResource.getResource());
- return matchedResource.getResource().process(request, response, callback);
+ return matchedResource.getResource().handle(request, response, callback);
}
}
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ProxiedRequestHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ProxiedRequestHandler.java
index eb08f94fc8fb..a9aca7a35245 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ProxiedRequestHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ProxiedRequestHandler.java
@@ -26,7 +26,7 @@
public class ProxiedRequestHandler extends Handler.Wrapper
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
ConnectionMetaData proxiedFor = new ConnectionMetaData.Wrapper(request.getConnectionMetaData())
{
@@ -59,7 +59,7 @@ public HostPort getServerAuthority()
}
};
- return super.process(new Request.Wrapper(request)
+ return super.handle(new Request.Wrapper(request)
{
@Override
public HttpURI getHttpURI()
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ReHandlingErrorProcessor.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ReHandlingErrorHandler.java
similarity index 84%
rename from jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ReHandlingErrorProcessor.java
rename to jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ReHandlingErrorHandler.java
index 233fd4236d11..9c87501b056b 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ReHandlingErrorProcessor.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ReHandlingErrorHandler.java
@@ -27,15 +27,15 @@
import org.slf4j.LoggerFactory;
/**
- * An ErrorProcessor that can re-handle a request at an error page location.
+ * An {@link ErrorHandler} that can re-handle a request at an error page location.
*/
-public abstract class ReHandlingErrorProcessor extends ErrorProcessor
+public abstract class ReHandlingErrorHandler extends ErrorHandler
{
- private static final Logger LOG = LoggerFactory.getLogger(ReHandlingErrorProcessor.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ReHandlingErrorHandler.class);
private final Handler _handler;
- protected ReHandlingErrorProcessor(Handler handler)
+ protected ReHandlingErrorHandler(Handler handler)
{
_handler = handler;
}
@@ -49,20 +49,20 @@ public InvocationType getInvocationType()
@Override
protected void generateResponse(Request request, Response response, int code, String message, Throwable cause, Callback callback) throws IOException
{
- if (request.getAttribute(ReHandlingErrorProcessor.class.getName()) == null)
+ if (request.getAttribute(ReHandlingErrorHandler.class.getName()) == null)
{
String pathInContext = getReHandlePathInContext(request, code, cause);
if (pathInContext != null)
{
- request.setAttribute(ReHandlingErrorProcessor.class.getName(), pathInContext);
+ request.setAttribute(ReHandlingErrorHandler.class.getName(), pathInContext);
HttpURI uri = Request.newHttpURIFrom(request, pathInContext);
ReHandleRequestWrapper reRequest = new ReHandleRequestWrapper(request, uri);
try
{
response.setStatus(200);
- if (_handler.process(reRequest, response, callback))
+ if (_handler.handle(reRequest, response, callback))
return;
}
catch (Exception e)
@@ -81,9 +81,9 @@ protected void generateResponse(Request request, Response response, int code, St
protected abstract String getReHandlePathInContext(Request request, int code, Throwable cause);
/**
- * An ErrorPageErrorProcessor that uses a map of error codes to select a page.
+ * An {@link ReHandlingErrorHandler} that uses a map of error codes to select a page.
*/
- public static class ByHttpStatus extends ReHandlingErrorProcessor
+ public static class ByHttpStatus extends ReHandlingErrorHandler
{
private final Map _statusMap = new ConcurrentHashMap<>();
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java
index 1c4eccbb7c60..830af4aeb564 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java
@@ -133,18 +133,18 @@ protected ResourceService.WelcomeFactory setupWelcomeFactory()
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if (!HttpMethod.GET.is(request.getMethod()) && !HttpMethod.HEAD.is(request.getMethod()))
{
// try another handler
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
HttpContent content = _resourceService.getContent(Request.getPathInContext(request), request);
if (content == null)
{
- return super.process(request, response, callback); // no content - try other handlers
+ return super.handle(request, response, callback); // no content - try other handlers
}
_resourceService.doGet(request, response, callback, content);
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/SecuredRedirectHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/SecuredRedirectHandler.java
index 7cadc7b2966b..9218d32fc4f0 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/SecuredRedirectHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/SecuredRedirectHandler.java
@@ -64,12 +64,12 @@ public SecuredRedirectHandler(final int code)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if (request.isSecure())
{
// Nothing to do here.
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
HttpConfiguration httpConfig = request.getConnectionMetaData().getHttpConfiguration();
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ShutdownHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ShutdownHandler.java
index a4350085a236..1f0897ca9380 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ShutdownHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ShutdownHandler.java
@@ -120,7 +120,7 @@ public ShutdownHandler(String shutdownPath, String shutdownToken, boolean exitJV
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
String fullPath = request.getHttpURI().getCanonicalPath();
ContextHandler contextHandler = ContextHandler.getContextHandler(request);
@@ -130,7 +130,7 @@ public boolean process(Request request, Response response, Callback callback) th
String pathInContext = contextHandler.getContext().getPathInContext(fullPath);
if (!pathInContext.startsWith(this._shutdownPath))
{
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
}
else
@@ -138,7 +138,7 @@ public boolean process(Request request, Response response, Callback callback) th
// We are standalone
if (!fullPath.startsWith(this._shutdownPath))
{
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
}
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/StatisticsHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/StatisticsHandler.java
index 5fced2ef7799..a825d5d6909c 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/StatisticsHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/StatisticsHandler.java
@@ -35,9 +35,9 @@
public class StatisticsHandler extends Handler.Wrapper
{
- private final CounterStatistic _requestStats = new CounterStatistic(); // how many requests are being processed (full lifecycle)
+ private final CounterStatistic _requestStats = new CounterStatistic(); // how many requests are being handled (full lifecycle)
private final SampleStatistic _requestTimeStats = new SampleStatistic(); // latencies of requests (full lifecycle)
- private final LongAdder _processingErrors = new LongAdder();
+ private final LongAdder _handlingFailures = new LongAdder();
private final LongAdder _responses1xx = new LongAdder();
private final LongAdder _responses2xx = new LongAdder();
private final LongAdder _responses3xx = new LongAdder();
@@ -47,7 +47,7 @@ public class StatisticsHandler extends Handler.Wrapper
private final LongAdder _bytesWritten = new LongAdder();
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
Handler next = getHandler();
if (next == null)
@@ -56,14 +56,14 @@ public boolean process(Request request, Response response, Callback callback) th
StatisticsRequest statisticsRequest = newStatisticsRequest(request);
try
{
- if (next.process(statisticsRequest, response, callback))
+ if (next.handle(statisticsRequest, response, callback))
return true;
- statisticsRequest.notProcessed();
+ statisticsRequest.notHandled();
return false;
}
catch (Throwable t)
{
- _processingErrors.increment();
+ _handlingFailures.increment();
throw t;
}
}
@@ -74,7 +74,7 @@ public void dump(Appendable out, String indent) throws IOException
dumpObjects(out, indent,
Dumpable.named("requestStats", _requestStats),
Dumpable.named("requestTimeStats", _requestTimeStats),
- Dumpable.named("processingErrors", _processingErrors),
+ Dumpable.named("handlingFailures", _handlingFailures),
Dumpable.named("1xxResponses", _responses1xx),
Dumpable.named("2xxResponses", _responses2xx),
Dumpable.named("3xxResponses", _responses3xx),
@@ -95,7 +95,7 @@ public void reset()
{
_requestStats.reset();
_requestTimeStats.reset();
- _processingErrors.reset();
+ _handlingFailures.reset();
_responses1xx.reset();
_responses2xx.reset();
_responses3xx.reset();
@@ -153,10 +153,10 @@ public int getResponses5xx()
return _responses5xx.intValue();
}
- @ManagedAttribute("number of requests that threw an exception during processing")
- public int getProcessingErrors()
+ @ManagedAttribute("number of requests that threw an exception during handling")
+ public int getHandlingFailures()
{
- return _processingErrors.intValue();
+ return _handlingFailures.intValue();
}
@ManagedAttribute("total time spend in all request execution (in ns)")
@@ -212,10 +212,10 @@ public HttpStream asHttpStream(HttpStream httpStream)
/**
* Creating a {@link StatisticsRequest} increments the {@link #getRequests() request counter} before its gets a chance
* of figuring out if the request is going to be handled by the {@link StatisticsHandler#getHandler() wrapped handler}.
- * In case the wrapped handler did not process the request, calling this method decrements the request counter to
+ * In case the wrapped handler did not handle the request, calling this method decrements the request counter to
* compensate for the unneeded increment.
*/
- protected void notProcessed()
+ protected void notHandled()
{
_requestStats.decrement();
}
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ThreadLimitHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ThreadLimitHandler.java
index ea4fd74ff762..3f11b8828943 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ThreadLimitHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ThreadLimitHandler.java
@@ -161,26 +161,26 @@ public void exclude(String inetAddressPattern)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
Handler next = getHandler();
if (next == null)
return false;
if (!_enabled)
- return next.process(request, response, callback);
+ return next.handle(request, response, callback);
// Get the remote address of the request
Remote remote = getRemote(request);
if (remote == null)
{
// if remote is not known, handle normally
- return next.process(request, response, callback);
+ return next.handle(request, response, callback);
}
- // We accept the request and will always process it.
+ // We accept the request and will always handle it.
LimitedRequest limitedRequest = new LimitedRequest(remote, next, request, response, callback);
- limitedRequest.process();
+ limitedRequest.handle();
return true;
}
@@ -298,7 +298,7 @@ protected Callback getCallback()
return _callback;
}
- protected void process() throws Exception
+ protected void handle() throws Exception
{
Permit permit = _remote.acquire();
@@ -307,21 +307,21 @@ protected void process() throws Exception
{
if (LOG.isDebugEnabled())
LOG.debug("Thread permitted {} {} {}", _remote, getWrapped(), _handler);
- process(permit);
+ handle(permit);
}
else
{
if (LOG.isDebugEnabled())
LOG.debug("Thread limited {} {} {}", _remote, getWrapped(), _handler);
- permit.whenAllocated(this::process);
+ permit.whenAllocated(this::handle);
}
}
- protected void process(Permit permit)
+ protected void handle(Permit permit)
{
try
{
- if (!_handler.process(this, _response, _callback))
+ if (!_handler.handle(this, _response, _callback))
Response.writeError(this, _response, _callback, HttpStatus.NOT_FOUND_404);
}
catch (Throwable x)
@@ -588,8 +588,8 @@ public void release()
if (pending != null)
{
- // We cannot complete the pending in this thread, as we may be in a process, demand or write callback
- // that is serialized and other actions are waiting for the return. Thus, we must execute.
+ // We cannot complete the pending in this thread, as we may be in handle(), demand() or write
+ // callback that is serialized and other actions are waiting for the return. Thus, we must execute.
_executor.execute(pending::complete);
}
}
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/TryPathsHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/TryPathsHandler.java
index b49b893fac1e..7abd4f099b31 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/TryPathsHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/TryPathsHandler.java
@@ -132,7 +132,7 @@ public void setPaths(List paths)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
Handler next = getHandler();
if (next == null)
@@ -141,7 +141,7 @@ public boolean process(Request request, Response response, Callback callback) th
return false;
if (paths.size() == 1)
{
- if (!super.process(new TryPathsRequest(request, interpolate(request, paths.get(0))), response, callback))
+ if (!super.handle(new TryPathsRequest(request, interpolate(request, paths.get(0))), response, callback))
Response.writeError(request, response, callback, HttpStatus.NOT_FOUND_404);
}
else
@@ -190,7 +190,7 @@ protected Action process() throws Throwable
TryPathsRequest tryRequest = new TryPathsRequest(request, interpolated);
TryPathsResponse tryResponse = new TryPathsResponse(tryRequest, response);
trying = true;
- if (TryPathsHandler.super.process(tryRequest, tryResponse, this))
+ if (TryPathsHandler.super.handle(tryRequest, tryResponse, this))
return Action.SCHEDULED;
trying = false;
}
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java
index 0a604c85dfea..e74dd4893612 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java
@@ -513,7 +513,7 @@ public void setInflateBufferSize(int size)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if (LOG.isDebugEnabled())
LOG.debug("{} handle {}", this, request);
@@ -524,7 +524,7 @@ public boolean process(Request request, Response response, Callback callback) th
// Are we already being gzipped?
if (Request.as(request, GzipRequest.class) != null)
- return next.process(request, response, callback);
+ return next.handle(request, response, callback);
String path = Request.getPathInContext(request);
boolean tryInflate = getInflateBufferSize() >= 0 && isPathInflatable(path);
@@ -533,7 +533,7 @@ public boolean process(Request request, Response response, Callback callback) th
// Can we skip looking at the request and wrapping request or response?
if (!tryInflate && !tryDeflate)
// No need for a Vary header, as we will never deflate
- return next.process(request, response, callback);
+ return next.handle(request, response, callback);
// Look for inflate and deflate headers
HttpFields fields = request.getHeaders();
@@ -573,8 +573,8 @@ else if (tryDeflate && _vary != null)
response.getHeaders().ensureField(_vary);
}
- // Call the process with the possibly wrapped request, response and callback
- if (next.process(request, response, callback))
+ // Call handle() with the possibly wrapped request, response and callback
+ if (next.handle(request, response, callback))
return true;
// If the request was not accepted, destroy any gzipRequest wrapper
diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpChannelState.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpChannelState.java
index 0dd3ce009537..3539e4b8efaa 100644
--- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpChannelState.java
+++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpChannelState.java
@@ -118,8 +118,8 @@ enum WriteState
private final SerializedInvoker _serializedInvoker;
private final Attributes _requestAttributes = new Attributes.Lazy();
private final ResponseHttpFields _responseHeaders = new ResponseHttpFields();
- private Thread _processing;
- private boolean _processed;
+ private Thread _handling;
+ private boolean _handled;
private WriteState _writeState = WriteState.NOT_LAST;
private boolean _callbackCompleted = false;
private Throwable _failure;
@@ -158,8 +158,8 @@ public void recycle()
// Recycle.
_requestAttributes.clearAttributes();
_responseHeaders.reset();
- _processing = null;
- _processed = false;
+ _handling = null;
+ _handled = false;
_writeState = WriteState.NOT_LAST;
_callbackCompleted = false;
_failure = null;
@@ -253,10 +253,10 @@ public Attributes getCache()
}
/**
- * Start request handling by returning a Runnable that will call {@link Handler#process(Request, Response, Callback)}.
+ * Start request handling by returning a Runnable that will call {@link Handler#handle(Request, Response, Callback)}.
*
* @param request The request metadata to handle.
- * @return A Runnable that will call {@link Handler#process(Request, Response, Callback)}. Unlike all other {@link Runnable}s
+ * @return A Runnable that will call {@link Handler#handle(Request, Response, Callback)}. Unlike all other {@link Runnable}s
* returned by HttpChannel methods, this runnable should not be mutually excluded or serialized. Specifically
* other {@link Runnable}s returned by methods on this class can be run concurrently with the {@link Runnable}
* returned from this method.
@@ -307,7 +307,7 @@ public boolean isRequestHandled()
{
try (AutoLock ignored = _lock.lock())
{
- return _processing != null || _processed;
+ return _handling != null || _handled;
}
}
@@ -384,15 +384,15 @@ else if (_error.getCause() != x)
Runnable invokeCallback = () ->
{
// Only fail the callback if the request was not accepted.
- boolean processing;
+ boolean handling;
try (AutoLock ignore = _lock.lock())
{
- processing = _processing != null || _processed;
+ handling = _handling != null || _handled;
}
- if (processing)
+ if (handling)
{
if (LOG.isDebugEnabled())
- LOG.debug("already processed, skipping failing callback in {}", HttpChannelState.this);
+ LOG.debug("already handled, skipping failing callback in {}", HttpChannelState.this);
}
else
{
@@ -484,11 +484,11 @@ public String toString()
{
try (AutoLock ignored = _lock.lock())
{
- return String.format("%s@%x{processing=%s, processed=%b, writeState=%s, completed=%b, writeCallback=%s, request=%s}",
+ return String.format("%s@%x{handling=%s, handled=%b, writeState=%s, completed=%b, writeCallback=%s, request=%s}",
this.getClass().getSimpleName(),
hashCode(),
- _processing,
- _processed,
+ _handling,
+ _handled,
_writeState,
_callbackCompleted,
_writeCallback,
@@ -508,8 +508,8 @@ public void run()
ChannelRequest request;
try (AutoLock ignored = _lock.lock())
{
- assert _processing == null && !_processed;
- _processing = Thread.currentThread();
+ assert _handling == null && !_handled;
+ _handling = Thread.currentThread();
request = _request;
}
@@ -550,7 +550,7 @@ public void run()
if (customized != request && server.getRequestLog() != null)
request.setLoggedRequest(customized);
- if (!server.process(customized, request._response, request._callback))
+ if (!server.handle(customized, request._response, request._callback))
Response.writeError(customized, request._response, request._callback, HttpStatus.NOT_FOUND_404);
}
catch (Throwable t)
@@ -567,8 +567,8 @@ public void run()
if (failure == null)
{
- _processing = null;
- _processed = true;
+ _handling = null;
+ _handled = true;
failure = ExceptionUtil.combine(_failure, failure);
completeStream = _callbackCompleted && (failure != null || _writeState == WriteState.LAST_WRITE_COMPLETED);
}
@@ -580,8 +580,8 @@ public void run()
try (AutoLock ignored = _lock.lock())
{
- _processing = null;
- _processed = true;
+ _handling = null;
+ _handled = true;
failure = ExceptionUtil.combine(_failure, failure);
completeStream = _callbackCompleted && (failure != null || _writeState == WriteState.LAST_WRITE_COMPLETED);
}
@@ -602,7 +602,7 @@ public void succeeded()
{
_writeState = WriteState.LAST_WRITE_COMPLETED;
assert _callbackCompleted;
- completeStream = _processing == null;
+ completeStream = _handling == null;
stream = _stream;
}
@@ -622,7 +622,7 @@ public void failed(Throwable failure)
{
_writeState = WriteState.LAST_WRITE_COMPLETED;
assert _callbackCompleted;
- completeStream = _processing == null;
+ completeStream = _handling == null;
stream = _stream;
if (_failure == null)
_failure = failure;
@@ -1260,7 +1260,7 @@ public void succeeded()
return;
httpChannelState = _request._httpChannel;
completeStream =
- httpChannelState._processing == null &&
+ httpChannelState._handling == null &&
httpChannelState._writeState == WriteState.LAST_WRITE_COMPLETED;
// We are being tough on handler implementations and expect them
@@ -1323,7 +1323,7 @@ public void failed(Throwable failure)
return;
httpChannelState = _request._httpChannel;
httpChannelState._failure = failure;
- completeStream = httpChannelState._processing == null;
+ completeStream = httpChannelState._handling == null;
// Verify whether we can write an error response.
writeErrorResponse = !httpChannelState._stream.isCommitted();
@@ -1453,7 +1453,7 @@ public void succeeded()
{
httpChannel = _request.getHttpChannel();
- // Did the errorProcessor do the last write?
+ // Did the ErrorHandler do the last write?
needLastWrite = httpChannel._writeState.ordinal() <= WriteState.LAST_WRITTEN.ordinal();
if (needLastWrite && httpChannel._responseHeaders.commit())
responseMetaData = _request._response.lockedPrepareResponse(httpChannel, true);
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/AbstractHttpTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/AbstractHttpTest.java
index eeddd2d52ebd..d7f642025986 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/AbstractHttpTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/AbstractHttpTest.java
@@ -108,7 +108,7 @@ protected ThrowExceptionOnDemandHandler(boolean throwException)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if (throwException)
throw new TestCommitException();
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ConnectionOpenCloseTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ConnectionOpenCloseTest.java
index b713647424d6..ace9a9f6b035 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ConnectionOpenCloseTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ConnectionOpenCloseTest.java
@@ -63,7 +63,7 @@ public void testOpenClose() throws Exception
server.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
throw new IllegalStateException();
}
@@ -112,7 +112,7 @@ public void testOpenRequestClose() throws Exception
server.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
callback.succeeded();
return true;
@@ -184,7 +184,7 @@ public void testSSLOpenRequestClose() throws Exception
server.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
callback.succeeded();
return true;
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ConnectorTimeoutTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ConnectorTimeoutTest.java
index c17f7ebaa7c5..fc5ae265513f 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ConnectorTimeoutTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ConnectorTimeoutTest.java
@@ -154,7 +154,7 @@ public void testMaxIdleWithRequest10NoClientClose() throws Exception
startServer(new HelloWorldHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
try
{
@@ -164,7 +164,7 @@ public boolean process(Request request, Response response, Callback callback) th
{
e.printStackTrace();
}
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
});
Socket client = newSocket(_serverURI.getHost(), _serverURI.getPort());
@@ -212,7 +212,7 @@ public void testMaxIdleWithRequest11NoClientClose() throws Exception
startServer(new EchoHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
try
{
@@ -222,7 +222,7 @@ public boolean process(Request request, Response response, Callback callback) th
{
e.printStackTrace();
}
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
});
Socket client = newSocket(_serverURI.getHost(), _serverURI.getPort());
@@ -528,7 +528,7 @@ public void testMaxIdleWithWait() throws Exception
protected static class SlowResponseHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
@@ -561,7 +561,7 @@ public HugeResponseHandler(int iterations)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
// Create a big single buffer
@@ -581,7 +581,7 @@ public boolean process(Request request, Response response, Callback callback) th
protected static class WaitHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
try
@@ -604,7 +604,7 @@ public boolean process(Request request, Response response, Callback callback) th
public static class EchoWholeHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
long expectedContentLength = request.getHeaders().getLongField(HttpHeader.CONTENT_LENGTH);
if (expectedContentLength <= 0)
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/CustomRequestLogTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/CustomRequestLogTest.java
index 6748c8237c9d..b47b6315b17e 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/CustomRequestLogTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/CustomRequestLogTest.java
@@ -138,7 +138,7 @@ public void testModifier() throws Exception
start("%s: %!404,301{Referer}i", new SimpleHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
String status = request.getHeaders().get("Status");
response.setStatus(Integer.parseInt(status));
@@ -254,7 +254,7 @@ public void testLogBytesSent() throws Exception
start("BytesSent: %O", new SimpleHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
Content.Sink.write(response, true, content, callback);
return true;
@@ -274,7 +274,7 @@ public void testLogBytesReceived() throws Exception
start("BytesReceived: %I", new SimpleHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
Content.Source.consumeAll(request, callback);
return true;
@@ -298,7 +298,7 @@ public void testLogBytesTransferred() throws Exception
start("BytesTransferred: %S", new SimpleHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
String content = Content.Source.asString(request);
Content.Sink.write(response, true, content, callback);
@@ -423,7 +423,7 @@ public void testLogResponseHeader() throws Exception
start("ResponseHeader: %{Header1}o, %{Header2}o, %{Header3}o", new SimpleHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.getHeaders().add("Header1", "value1");
response.getHeaders().add("Header2", "value2");
@@ -470,7 +470,7 @@ public void testLogResponseStatus() throws Exception
start("LogResponseStatus: %s", new SimpleHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
String status = request.getHeaders().get("Status");
response.setStatus(Integer.parseInt(status));
@@ -514,7 +514,7 @@ public void testLogRequestTime() throws Exception
start("RequestTime: %t", new SimpleHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
requestTimeRef.set(request.getTimeStamp());
callback.succeeded();
@@ -539,7 +539,7 @@ public void testLogRequestTimeCustomFormats() throws Exception
%{EEE MMM dd HH:mm:ss zzz yyyy|EST|ja}t""", new SimpleHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
requestTimeRef.set(request.getTimeStamp());
callback.succeeded();
@@ -572,7 +572,7 @@ public void testLogLatency(String unit) throws Exception
start("%{" + unit + "}T", new SimpleHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
requestTimeRef.set(request.getTimeStamp());
Thread.sleep(delay);
@@ -621,7 +621,7 @@ public void testLogConnectionStatus() throws Exception
start("%U ConnectionStatus: %s %X", new SimpleHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
if (Request.getPathInContext(request).equals("/abort"))
{
@@ -691,7 +691,7 @@ public void testLogRequestTrailer() throws Exception
start("%{trailerName}ti", new SimpleHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
Content.Source.consumeAll(request, callback);
return true;
@@ -718,7 +718,7 @@ public void testLogResponseTrailer() throws Exception
start("%{trailerName}to", new SimpleHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
HttpFields.Mutable trailers = HttpFields.build();
response.setTrailersSupplier(() -> trailers);
@@ -747,7 +747,7 @@ public void write(String requestEntry)
private static class SimpleHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
callback.succeeded();
return true;
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ErrorProcessorTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ErrorHandlerTest.java
similarity index 93%
rename from jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ErrorProcessorTest.java
rename to jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ErrorHandlerTest.java
index 7303b41bbe16..512af5fbeb18 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ErrorProcessorTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ErrorHandlerTest.java
@@ -31,8 +31,8 @@
import org.eclipse.jetty.logging.StacklessLogging;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
-import org.eclipse.jetty.server.handler.ErrorProcessor;
-import org.eclipse.jetty.server.handler.ReHandlingErrorProcessor;
+import org.eclipse.jetty.server.handler.ErrorHandler;
+import org.eclipse.jetty.server.handler.ReHandlingErrorHandler;
import org.eclipse.jetty.server.internal.HttpChannelState;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Callback;
@@ -55,7 +55,7 @@
import static org.hamcrest.Matchers.nullValue;
import static org.junit.jupiter.api.Assertions.assertTrue;
-public class ErrorProcessorTest
+public class ErrorHandlerTest
{
StacklessLogging stacklessLogging;
Server server;
@@ -72,7 +72,7 @@ public void before() throws Exception
server.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
String pathInContext = Request.getPathInContext(request);
if (pathInContext.startsWith("/badmessage/"))
@@ -121,7 +121,7 @@ public boolean process(Request request, Response response, Callback callback)
Content.Sink.write(
response,
true,
- "%s Error %s : %s%n".formatted(pathInContext, request.getAttribute(ErrorProcessor.ERROR_STATUS), request.getAttribute(ErrorProcessor.ERROR_MESSAGE)),
+ "%s Error %s : %s%n".formatted(pathInContext, request.getAttribute(ErrorHandler.ERROR_STATUS), request.getAttribute(ErrorHandler.ERROR_MESSAGE)),
callback);
return true;
}
@@ -457,10 +457,10 @@ public void testBadMessage() throws Exception
@Test
public void testNoBodyErrorHandler() throws Exception
{
- server.setErrorProcessor((request, response, callback) ->
+ server.setErrorHandler((request, response, callback) ->
{
response.getHeaders().put(HttpHeader.LOCATION, "/error");
- response.getHeaders().put("X-Error-Message", String.valueOf(request.getAttribute(ErrorProcessor.ERROR_MESSAGE)));
+ response.getHeaders().put("X-Error-Message", String.valueOf(request.getAttribute(ErrorHandler.ERROR_MESSAGE)));
response.getHeaders().put("X-Error-Status", Integer.toString(response.getStatus()));
response.setStatus(302);
response.write(true, null, callback);
@@ -659,10 +659,10 @@ public void testErrorContextRecycle() throws Exception
server.setHandler(contexts);
ContextHandler context = new ContextHandler("/foo");
contexts.addHandler(context);
- context.setErrorProcessor(new ErrorProcessor()
+ context.setErrorHandler(new ErrorHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.write(true, BufferUtil.toBuffer("Context Error"), callback);
return true;
@@ -671,17 +671,17 @@ public boolean process(Request request, Response response, Callback callback)
context.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
Response.writeError(request, response, callback, 444);
return true;
}
});
- server.setErrorProcessor(new ErrorProcessor()
+ server.setErrorHandler(new ErrorHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.write(true, BufferUtil.toBuffer("Server Error"), callback);
return true;
@@ -710,11 +710,11 @@ public boolean process(Request request, Response response, Callback callback)
}
@Test
- public void testRootReHandlingErrorProcessor() throws Exception
+ public void testRootReHandlingErrorHandler() throws Exception
{
- ReHandlingErrorProcessor.ByHttpStatus errorProcessor = new ReHandlingErrorProcessor.ByHttpStatus(server);
- errorProcessor.put(400, "/ok/badMessage");
- server.setErrorProcessor(errorProcessor);
+ ReHandlingErrorHandler.ByHttpStatus errorHandler = new ReHandlingErrorHandler.ByHttpStatus(server);
+ errorHandler.put(400, "/ok/badMessage");
+ server.setErrorHandler(errorHandler);
String rawResponse = connector.getResponse("""
GET /no/host HTTP/1.1
@@ -729,11 +729,11 @@ public void testRootReHandlingErrorProcessor() throws Exception
}
@Test
- public void testRootReHandlingErrorProcessorLoop() throws Exception
+ public void testRootReHandlingErrorHandlerLoop() throws Exception
{
- ReHandlingErrorProcessor.ByHttpStatus errorProcessor = new ReHandlingErrorProcessor.ByHttpStatus(server);
- errorProcessor.put(404, "/not/found");
- server.setErrorProcessor(errorProcessor);
+ ReHandlingErrorHandler.ByHttpStatus errorHandler = new ReHandlingErrorHandler.ByHttpStatus(server);
+ errorHandler.put(404, "/not/found");
+ server.setErrorHandler(errorHandler);
String rawResponse = connector.getResponse("""
GET /not/found HTTP/1.1
@@ -749,11 +749,11 @@ public void testRootReHandlingErrorProcessorLoop() throws Exception
}
@Test
- public void testRootReHandlingErrorProcessorExceptionLoop() throws Exception
+ public void testRootReHandlingErrorHandlerExceptionLoop() throws Exception
{
- ReHandlingErrorProcessor.ByHttpStatus errorProcessor = new ReHandlingErrorProcessor.ByHttpStatus(server);
- errorProcessor.put(444, "/badmessage/444");
- server.setErrorProcessor(errorProcessor);
+ ReHandlingErrorHandler.ByHttpStatus errorHandler = new ReHandlingErrorHandler.ByHttpStatus(server);
+ errorHandler.put(444, "/badmessage/444");
+ server.setErrorHandler(errorHandler);
String rawResponse = connector.getResponse("""
GET /badmessage/444 HTTP/1.1
@@ -769,7 +769,7 @@ public void testRootReHandlingErrorProcessorExceptionLoop() throws Exception
}
@Test
- public void testContextReHandlingErrorProcessor() throws Exception
+ public void testContextReHandlingErrorHandler() throws Exception
{
server.stop();
@@ -780,19 +780,19 @@ public void testContextReHandlingErrorProcessor() throws Exception
contexts.addHandler(context);
server.setHandler(contexts);
- server.setErrorProcessor(new ErrorProcessor()
+ server.setErrorHandler(new ErrorHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
throw new UnsupportedOperationException();
}
});
server.start();
- ReHandlingErrorProcessor.ByHttpStatus errorProcessor = new ReHandlingErrorProcessor.ByHttpStatus(context);
- errorProcessor.put(444, "/ok/badMessage");
- context.setErrorProcessor(errorProcessor);
+ ReHandlingErrorHandler.ByHttpStatus errorHandler = new ReHandlingErrorHandler.ByHttpStatus(context);
+ errorHandler.put(444, "/ok/badMessage");
+ context.setErrorHandler(errorHandler);
String rawResponse = connector.getResponse("""
GET /ctx/badmessage/444 HTTP/1.1
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ExtendedServerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ExtendedServerTest.java
index 38f9465fec4e..66684f6951e8 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ExtendedServerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ExtendedServerTest.java
@@ -144,7 +144,7 @@ public void testExtended() throws Exception
protected static class DispatchedAtHandler extends Handler.Abstract.NonBlocking
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
response.write(true, BufferUtil.toBuffer("DispatchedAt=" + request.getAttribute("DispatchedAt") + "\r\n"), callback);
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ForwardedRequestCustomizerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ForwardedRequestCustomizerTest.java
index acde1f5d63d5..bd7219956686 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ForwardedRequestCustomizerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ForwardedRequestCustomizerTest.java
@@ -1356,7 +1356,7 @@ private static class RequestHandler extends Handler.Abstract
private RequestTester requestTester;
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if (requestTester != null && requestTester.check(request, response))
{
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/GracefulHandlerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/GracefulHandlerTest.java
index 6b1a976d19d2..3b0e62af577c 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/GracefulHandlerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/GracefulHandlerTest.java
@@ -111,7 +111,7 @@ private CompletableFuture runAsyncServerStop()
}
/**
- * Test for when a Handler throws an unhandled Exception from {@link Handler#process(Request, Response, Callback)}
+ * Test for when a Handler throws an unhandled Exception from {@link Handler#handle(Request, Response, Callback)}
* when in normal mode (not during graceful mode). This test exists to ensure that the Callback management of
* the {@link GracefulHandler} doesn't mess with normal operations of requests.
*/
@@ -122,7 +122,7 @@ public void testHandlerNormalUnhandledException() throws Exception
gracefulHandler.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
throw new RuntimeException("Intentional Exception");
}
@@ -168,7 +168,7 @@ public boolean process(Request request, Response response, Callback callback) th
}
/**
- * Test for when a Handler throws an unhandled Exception {@link Handler#process(Request, Response, Callback)}
+ * Test for when a Handler throws an unhandled Exception {@link Handler#handle(Request, Response, Callback)}
* when in graceful mode.
*/
@Test
@@ -179,7 +179,7 @@ public void testHandlerGracefulUnhandledException() throws Exception
gracefulHandler.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
LOG.info("process: request={}", request);
// let main thread know that we've reach this handler
@@ -244,7 +244,7 @@ public void testHandlerNormalCallbackFailure() throws Exception
gracefulHandler.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
callback.failed(new RuntimeException("Intentional Failure"));
return true;
@@ -302,7 +302,7 @@ public void testHandlerGracefulCallbackFailure() throws Exception
gracefulHandler.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
dispatchLatch.countDown();
// wait for graceful to kick in
@@ -355,19 +355,19 @@ public boolean process(Request request, Response response, Callback callback) th
}
/**
- * Test for when a Handler returns false from {@link Handler#process(Request, Response, Callback)}
+ * Test for when a Handler returns false from {@link Handler#handle(Request, Response, Callback)}
* when in normal mode (not during graceful mode).
* This test exists to ensure that the Callback management of the {@link GracefulHandler} doesn't
* mess with normal operations of requests.
*/
@Test
- public void testHandlerNormalProcessingFalse() throws Exception
+ public void testHandlerNormalHandleReturnsFalse() throws Exception
{
GracefulHandler gracefulHandler = new GracefulHandler();
gracefulHandler.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
return false;
}
@@ -409,18 +409,18 @@ public boolean process(Request request, Response response, Callback callback) th
}
/**
- * Test for when a Handler returns false from {@link Handler#process(Request, Response, Callback)}
+ * Test for when a Handler returns false from {@link Handler#handle(Request, Response, Callback)}
* when in graceful mode.
*/
@Test
- public void testHandlerGracefulProcessingFalse() throws Exception
+ public void testHandlerGracefulHandleReturnsFalse() throws Exception
{
AtomicReference> stopFuture = new AtomicReference<>();
GracefulHandler gracefulHandler = new GracefulHandler();
gracefulHandler.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
stopFuture.set(runAsyncServerStop());
await().atMost(5, TimeUnit.SECONDS).until(() -> gracefulHandler.isShutdown());
@@ -688,7 +688,7 @@ static class BlockingReadHandler extends Handler.Abstract
private static final Logger LOG = LoggerFactory.getLogger(BlockingReadHandler.class);
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
LOG.debug("process: request={}", request);
onBeforeRead(request, response);
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HalfCloseTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HalfCloseTest.java
index ba371c560a1b..48f60baa62e5 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HalfCloseTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HalfCloseTest.java
@@ -144,7 +144,7 @@ public TestHandler()
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
handled++;
response.getHeaders().add(HttpHeader.CONTENT_TYPE, "text/html;charset=utf-8");
@@ -168,7 +168,7 @@ public AsyncHandler()
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
handled++;
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpChannelEventTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpChannelEventTest.java
index eaf2044e9666..639fb577b927 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpChannelEventTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpChannelEventTest.java
@@ -345,7 +345,7 @@ public void onComplete(Request request)
private static class TestHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
try
{
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpChannelTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpChannelTest.java
index c70c88b0627f..140169c10264 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpChannelTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpChannelTest.java
@@ -150,7 +150,7 @@ public void testRecursiveGET() throws Exception
_server.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.setStatus(200);
response.getHeaders().put(HttpHeader.CONTENT_TYPE, MimeTypes.Type.TEXT_PLAIN_UTF_8.asString());
@@ -399,7 +399,7 @@ public void testNoop() throws Exception
Handler handler = new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
return false;
}
@@ -430,7 +430,7 @@ public void testThrow() throws Exception
Handler handler = new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
throw new UnsupportedOperationException("testing");
}
@@ -464,7 +464,7 @@ public void testCompleteThenThrow() throws Exception
Handler handler = new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.setStatus(200);
Content.Sink.write(response, true, "Before throw", Callback.from(callback, () ->
@@ -502,7 +502,7 @@ public void testCommitThenThrowFromCallback() throws Exception
Handler handler = new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.setStatus(200);
response.getHeaders().putLongField(HttpHeader.CONTENT_LENGTH, 10);
@@ -540,7 +540,7 @@ public void testAutoContentLength() throws Exception
Handler handler = new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.write(true, BufferUtil.toBuffer("12345"), callback);
return true;
@@ -572,7 +572,7 @@ public void testInsufficientContentWritten1() throws Exception
Handler handler = new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.getHeaders().putLongField(HttpHeader.CONTENT_LENGTH, 10);
response.write(true, BufferUtil.toBuffer("12345"), callback);
@@ -608,7 +608,7 @@ public void testInsufficientContentWritten2() throws Exception
Handler handler = new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.getHeaders().putLongField(HttpHeader.CONTENT_LENGTH, 10);
response.write(false,
@@ -642,7 +642,7 @@ public void testExcessContentWritten1() throws Exception
Handler handler = new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.getHeaders().putLongField(HttpHeader.CONTENT_LENGTH, 5);
response.write(true, BufferUtil.toBuffer("1234567890"), callback);
@@ -678,7 +678,7 @@ public void testExcessContentWritten2() throws Exception
Handler handler = new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.getHeaders().putLongField(HttpHeader.CONTENT_LENGTH, 5);
response.write(false, BufferUtil.toBuffer("1234"), Callback.from(() -> response.write(true, BufferUtil.toBuffer("567890"), callback)));
@@ -744,7 +744,7 @@ public void testUnconsumedContentUnavailable() throws Exception
Handler handler = new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.setStatus(200);
response.getHeaders().put(HttpHeader.CONTENT_TYPE, MimeTypes.Type.TEXT_PLAIN_UTF_8.asString());
@@ -787,7 +787,7 @@ public void testUnconsumedContentUnavailableClosed() throws Exception
Handler handler = new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.setStatus(200);
response.getHeaders().add(HttpHeader.CONNECTION, HttpHeaderValue.CLOSE.asString());
@@ -1070,7 +1070,7 @@ public void testDemandRecursion() throws Exception
_server.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
LongAdder contentSize = new LongAdder();
CountDownLatch latch = new CountDownLatch(1);
@@ -1151,7 +1151,7 @@ public void testOnError() throws Exception
Handler handler = new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
handling.set(response);
request.addErrorListener(t -> false);
@@ -1236,7 +1236,7 @@ public void testOnCommitAndComplete() throws Exception
EchoHandler echoHandler = new EchoHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
request.addHttpStreamWrapper(s -> new HttpStream.Wrapper(s)
{
@@ -1247,7 +1247,7 @@ public void succeeded()
super.succeeded();
}
});
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
};
_server.setHandler(echoHandler);
@@ -1329,29 +1329,29 @@ public void testCompletion(List events) throws Exception
@ParameterizedTest
@MethodSource("completionEvents")
- public void testCompletionNoWriteErrorProcessor(List events) throws Exception
+ public void testCompletionNoWriteErrorHandler(List events) throws Exception
{
- Request.Processor errorProcessor = (request, response, callback) ->
+ Request.Handler errorHandler = (request, response, callback) ->
{
callback.succeeded();
return true;
};
- testCompletion(events, errorProcessor, true);
+ testCompletion(events, errorHandler, true);
}
@ParameterizedTest
@MethodSource("completionEvents")
- public void testCompletionFailedErrorProcessor(List events) throws Exception
+ public void testCompletionFailedErrorHandler(List events) throws Exception
{
- Request.Processor errorProcessor = (request, response, callback) ->
+ Request.Handler errorHandler = (request, response, callback) ->
{
- callback.failed(new QuietException.Exception("Error processor failed"));
+ callback.failed(new QuietException.Exception("Error handler failed"));
return true;
};
- testCompletion(events, errorProcessor, false);
+ testCompletion(events, errorHandler, false);
}
- private void testCompletion(List events, Request.Processor errorProcessor, boolean expectErrorResponse) throws Exception
+ private void testCompletion(List events, Request.Handler errorHandler, boolean expectErrorResponse) throws Exception
{
CountDownLatch processing = new CountDownLatch(1);
CountDownLatch processed = new CountDownLatch(1);
@@ -1361,7 +1361,7 @@ private void testCompletion(List events, Request.Processor
Handler handler = new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
response.getHeaders().put("Test", "Value");
@@ -1374,8 +1374,8 @@ public boolean process(Request request, Response response, Callback callback) th
};
_server.setHandler(handler);
- if (errorProcessor != null)
- _server.setErrorProcessor(errorProcessor);
+ if (errorHandler != null)
+ _server.setErrorHandler(errorHandler);
_server.start();
ConnectionMetaData connectionMetaData = new MockConnectionMetaData(new MockConnector(_server));
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpConfigurationAuthorityOverrideTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpConfigurationAuthorityOverrideTest.java
index f2eedcd18d51..2c8b1c5eabca 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpConfigurationAuthorityOverrideTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpConfigurationAuthorityOverrideTest.java
@@ -27,7 +27,7 @@
import org.eclipse.jetty.http.HttpTester;
import org.eclipse.jetty.http.HttpURI;
import org.eclipse.jetty.io.Content;
-import org.eclipse.jetty.server.handler.ErrorProcessor;
+import org.eclipse.jetty.server.handler.ErrorHandler;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.HostPort;
import org.eclipse.jetty.util.component.LifeCycle;
@@ -643,7 +643,7 @@ private CloseableServer startServer(HostPort serverUriAuthority, InetSocketAddre
handlers.addHandler(new ErrorMsgHandler());
server.setHandler(handlers);
- server.setErrorProcessor(new RedirectErrorProcessor());
+ server.setErrorHandler(new RedirectErrorHandler());
server.start();
return new CloseableServer(server, connector);
@@ -652,7 +652,7 @@ private CloseableServer startServer(HostPort serverUriAuthority, InetSocketAddre
private static class DumpHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if (!Request.getPathInContext(request).startsWith("/dump"))
return false;
@@ -675,7 +675,7 @@ public boolean process(Request request, Response response, Callback callback) th
private static class RedirectHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if (!Request.getPathInContext(request).startsWith("/redirect"))
return false;
@@ -690,7 +690,7 @@ public boolean process(Request request, Response response, Callback callback) th
private static class ErrorMsgHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if (!Request.getPathInContext(request).startsWith("/error"))
return false;
@@ -701,13 +701,13 @@ public boolean process(Request request, Response response, Callback callback) th
}
}
- public static class RedirectErrorProcessor extends ErrorProcessor
+ public static class RedirectErrorHandler extends ErrorHandler
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.getHeaders().put("X-Error-Status", Integer.toString(response.getStatus()));
- response.getHeaders().put("X-Error-Message", String.valueOf(request.getAttribute(ErrorProcessor.ERROR_MESSAGE)));
+ response.getHeaders().put("X-Error-Message", String.valueOf(request.getAttribute(ErrorHandler.ERROR_MESSAGE)));
response.setStatus(HttpStatus.MOVED_TEMPORARILY_302);
String scheme = request.getHttpURI().getScheme();
if (scheme == null)
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpConnectionTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpConnectionTest.java
index 3ec4be8c1ca6..4d64d9a57b20 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpConnectionTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpConnectionTest.java
@@ -866,7 +866,7 @@ public void testEmptyFlush() throws Exception
_server.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.setStatus(200);
response.write(false, null, callback);
@@ -1142,7 +1142,7 @@ public void testOversizedResponse() throws Exception
_server.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.getHeaders().put(HttpHeader.CONTENT_TYPE.toString(), MimeTypes.Type.TEXT_HTML.toString());
response.getHeaders().put("LongStr", longstr);
@@ -1192,7 +1192,7 @@ public void testAllowedLargeResponse() throws Exception
_server.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.getHeaders().put(HttpHeader.CONTENT_TYPE.toString(), MimeTypes.Type.TEXT_HTML.toString());
response.getHeaders().put("LongStr", longstr);
@@ -1305,7 +1305,7 @@ public void testBytesIn() throws Exception
_server.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
while (true)
{
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java
index c247c2d56418..dc2ec3a5fdb4 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java
@@ -393,7 +393,7 @@ public void testExceptionThrownInHandlerLoop() throws Exception
startServer(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
throw new Exception("TEST handler exception");
}
@@ -422,7 +422,7 @@ public void testExceptionThrownInHandler() throws Exception
startServer(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
throw new Exception("TEST handler exception");
}
@@ -453,7 +453,7 @@ public void testInterruptedRequest() throws Exception
startServer(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
long contentLength = request.getLength();
long read = 0;
@@ -1127,7 +1127,7 @@ private BigBlockHandler()
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
response.getHeaders().put(HttpHeader.CONTENT_TYPE, "text/plain");
@@ -1163,10 +1163,10 @@ public void testPipeline() throws Exception
startServer(new HelloHandler("Hello\n")
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
served.incrementAndGet();
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
});
@@ -1339,7 +1339,7 @@ public static class CommittedErrorHandler extends Handler.Abstract
public EndPoint _endp;
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
_endp = request.getConnectionMetaData().getConnection().getEndPoint();
response.getHeaders().put("test", "value");
@@ -1565,7 +1565,7 @@ public void testWriteBodyAfterNoBodyResponse() throws Exception
private static class WriteBodyAfterNoBodyResponseHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.setStatus(304);
response.write(false, BufferUtil.toBuffer("yuck"), callback);
@@ -1576,7 +1576,7 @@ public boolean process(Request request, Response response, Callback callback)
public static class NoopHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
//don't read the input, just send something back
response.setStatus(200);
@@ -1682,7 +1682,7 @@ public void testHoldContent() throws Exception
startServer(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
request.getConnectionMetaData().getConnection().addEventListener(new Connection.Listener()
{
@@ -1796,7 +1796,7 @@ public TestHandler(boolean content)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
AtomicBoolean hasContent = new AtomicBoolean();
Request.Wrapper wrapper = new Request.Wrapper(request)
@@ -1811,7 +1811,7 @@ public Content.Chunk read()
}
};
- return super.process(wrapper, response, Callback.from(() ->
+ return super.handle(wrapper, response, Callback.from(() ->
{
if (_mustHaveContent && !hasContent.get())
callback.failed(new IllegalStateException("No Test Content"));
@@ -1828,12 +1828,12 @@ public void testProcessingAfterCompletion() throws Exception
Handler.Singleton wrapper = new Handler.Wrapper()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
request.setAttribute("test", "value");
try
{
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
finally
{
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestFixture.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestFixture.java
index f5cf1c911b7c..a7575a87fb96 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestFixture.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestFixture.java
@@ -84,7 +84,7 @@ protected void startServer(Handler handler) throws Exception
protected static class OptionsHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
if (request.getMethod().equals("OPTIONS"))
response.setStatus(200);
@@ -99,7 +99,7 @@ public boolean process(Request request, Response response, Callback callback)
protected static class HelloWorldHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
Content.Sink.write(response, true, "Hello world\r\n", callback);
@@ -119,7 +119,7 @@ public SendErrorHandler(int code, String message)
}
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
Response.writeError(request, response, callback, code, message);
return true;
@@ -141,7 +141,7 @@ public ReadExactHandler(int expected)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
long len = expected < 0 ? request.getLength() : expected;
if (len < 0)
@@ -184,7 +184,7 @@ public boolean process(Request request, Response response, Callback callback) th
protected static class ReadHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.setStatus(200);
Content.Source.asString(request, StandardCharsets.UTF_8, Promise.from(
@@ -198,7 +198,7 @@ public boolean process(Request request, Response response, Callback callback)
protected static class DataHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/LatencyRecordingHandlerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/LatencyRecordingHandlerTest.java
index f32ab97c7630..80d31f8fd648 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/LatencyRecordingHandlerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/LatencyRecordingHandlerTest.java
@@ -50,7 +50,7 @@ public void setUp() throws Exception
Handler handler = new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
String path = request.getHttpURI().getPath();
if (path.endsWith("/fail"))
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/MultiPartByteRangesTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/MultiPartByteRangesTest.java
index 6864012537b8..16b8f988d147 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/MultiPartByteRangesTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/MultiPartByteRangesTest.java
@@ -76,7 +76,7 @@ public void testByteRanges() throws Exception
start(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
assertTrue(request.getHeaders().contains(HttpHeader.ACCEPT_RANGES));
assertTrue(request.getHeaders().contains(HttpHeader.RANGE));
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/NotAcceptingTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/NotAcceptingTest.java
index f20080d0d6c6..d7242ef30b06 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/NotAcceptingTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/NotAcceptingTest.java
@@ -268,7 +268,7 @@ public TestHandler()
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
// TODO see below
return true;
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/OptionalSslConnectionTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/OptionalSslConnectionTest.java
index 07ce041392d2..0511192c41e4 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/OptionalSslConnectionTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/OptionalSslConnectionTest.java
@@ -242,7 +242,7 @@ public void testNextProtocolIsNotNullButNotConfiguredEither() throws Exception
private static class EmptyServerHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
callback.succeeded();
return true;
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ProxyCustomizerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ProxyCustomizerTest.java
index e37aba6aae7c..1f496a81f89f 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ProxyCustomizerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ProxyCustomizerTest.java
@@ -83,7 +83,7 @@ public void setUp() throws Exception
Handler handler = new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.getHeaders().add("preexisting.attribute", request.getAttribute("some.attribute").toString());
ArrayList attributeNames = new ArrayList<>(request.getAttributeNameSet());
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ProxyProtocolTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ProxyProtocolTest.java
index 5f2655a1275d..c2da721c2319 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ProxyProtocolTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ProxyProtocolTest.java
@@ -63,7 +63,7 @@ public void testProxyProtocolV1() throws Exception
start(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
SocketAddress addr = request.getConnectionMetaData().getRemoteSocketAddress();
if (addr instanceof InetSocketAddress iAddr)
@@ -132,7 +132,7 @@ public void testProxyProtocolV2() throws Exception
start(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
if (validateEndPoint(request) &&
remoteAddr.equals(Request.getRemoteAddr(request)) &&
@@ -231,7 +231,7 @@ public void testProxyProtocolV2Local() throws Exception
start(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
callback.succeeded();
return true;
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/RequestLogTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/RequestLogTest.java
index d0cf3bb87502..fa63273d017f 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/RequestLogTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/RequestLogTest.java
@@ -57,7 +57,7 @@ public class RequestLogTest
private static class NormalResponse extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.getHeaders().put(HttpHeader.CONTENT_TYPE, "text/plain; charset=UTF-8");
Content.Sink.write(response, true, "Got %s to %s%n".formatted(request.getMethod(), request.getHttpURI()), callback);
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/RequestTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/RequestTest.java
index 49112c2273ce..007be8646264 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/RequestTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/RequestTest.java
@@ -140,7 +140,7 @@ public void testContentLengthNotSetOneWrites() throws Exception
server.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
byte[] buf = new byte[bufferSize];
Arrays.fill(buf, (byte)'x');
@@ -177,7 +177,7 @@ public void testContentLengthNotSetTwoWrites() throws Exception
server.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
byte[] buf = new byte[bufferSize];
Arrays.fill(buf, (byte)'x');
@@ -225,7 +225,7 @@ public void testDifferentCookies() throws Exception
server.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request, Response response, Callback callback)
+ public boolean handle(org.eclipse.jetty.server.Request request, Response response, Callback callback)
{
response.setStatus(200);
response.getHeaders().put(HttpHeader.CONTENT_TYPE, "text/plain");
@@ -278,7 +278,7 @@ public void testGETNoConnectionClose() throws Exception
server.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request, Response response, Callback callback)
+ public boolean handle(org.eclipse.jetty.server.Request request, Response response, Callback callback)
{
response.setStatus(200);
response.getHeaders().put(HttpHeader.CONTENT_TYPE, "text/plain");
@@ -313,7 +313,7 @@ public void testHEADNoConnectionClose() throws Exception
server.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request, Response response, Callback callback)
+ public boolean handle(org.eclipse.jetty.server.Request request, Response response, Callback callback)
{
response.setStatus(200);
response.getHeaders().put(HttpHeader.CONTENT_TYPE, "text/plain");
@@ -352,7 +352,7 @@ public void testHEADWithConnectionClose() throws Exception
server.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request, Response response, Callback callback)
+ public boolean handle(org.eclipse.jetty.server.Request request, Response response, Callback callback)
{
response.setStatus(200);
response.getHeaders().put(HttpHeader.CONTENT_TYPE, "text/plain");
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorAcceptTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorAcceptTest.java
index 550b721a5bfb..e18d307dc961 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorAcceptTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorAcceptTest.java
@@ -46,7 +46,7 @@ public void testAccept(int acceptors) throws Exception
server.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
callback.succeeded();
return true;
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorHttpServerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorHttpServerTest.java
index b323bd6e89b8..1550b8e9f2cc 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorHttpServerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorHttpServerTest.java
@@ -47,7 +47,7 @@ public void testNonBlockingInvocationType() throws Exception
startServer(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
callback.succeeded();
return true;
@@ -92,7 +92,7 @@ public void testBlockingInvocationType() throws Exception
startServer(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
callback.succeeded();
return true;
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorTest.java
index 251e444ec2fd..1044b3751986 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorTest.java
@@ -65,7 +65,7 @@ public class ServerConnectorTest
public static class ReuseInfoHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.getHeaders().put(HttpHeader.CONTENT_TYPE, "text/plain");
@@ -243,7 +243,7 @@ public void testReusePort() throws Exception
server.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
callback.succeeded();
return true;
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/SlowClientWithPipelinedRequestTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/SlowClientWithPipelinedRequestTest.java
index 5936c37e41be..9defb422283a 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/SlowClientWithPipelinedRequestTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/SlowClientWithPipelinedRequestTest.java
@@ -82,7 +82,7 @@ public void testSlowClientWithPipelinedRequest() throws Exception
startServer(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if ("/content".equals(Request.getPathInContext(request)))
{
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/StopTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/StopTest.java
index 50ae91489cd0..8ce72bd7a13b 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/StopTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/StopTest.java
@@ -518,7 +518,7 @@ static class NoopHandler extends Handler.Abstract
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
callback.succeeded(); // TODO should the be after the countdown?
latch.countDown();
@@ -532,7 +532,7 @@ static class ABHandler extends Handler.Abstract
final CountDownLatch latchB = new CountDownLatch(1);
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.getHeaders().putLongField(HttpHeader.CONTENT_LENGTH, 2);
response.write(true, ByteBuffer.wrap("a".getBytes()), new Callback()
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ThreadStarvationTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ThreadStarvationTest.java
index 24cc17b9b762..251e571e45b1 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ThreadStarvationTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ThreadStarvationTest.java
@@ -243,7 +243,7 @@ public void testReadStarvation(Scenario scenario) throws Exception
protected static class ReadHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
/* TODO
@@ -348,7 +348,7 @@ protected static class WriteHandler extends Handler.Abstract
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
/* TODO
baseRequest.setHandled(true);
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/BufferedResponseHandlerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/BufferedResponseHandlerTest.java
index 5d8e2d294f7c..b18cbc38b681 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/BufferedResponseHandlerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/BufferedResponseHandlerTest.java
@@ -211,7 +211,7 @@ public TestHandler()
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerCollectionTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerCollectionTest.java
index 62fb274b5d7a..bf21fa97bfa0 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerCollectionTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerCollectionTest.java
@@ -418,10 +418,10 @@ private static final class WrappedHandler extends Handler.Wrapper
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.getHeaders().put("Wrapped", tag);
- if (super.process(request, response, callback))
+ if (super.handle(request, response, callback))
return true;
response.getHeaders().remove("Wrapped");
return false;
@@ -444,7 +444,7 @@ public boolean isHandled()
}
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
this.handled = true;
response.getHeaders().put("X-IsHandled-Name", name);
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerDeepTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerDeepTest.java
index 88c2f6dd2299..01d547c35d59 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerDeepTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerDeepTest.java
@@ -67,7 +67,7 @@ public void testNestedThreeDeepContextHandler() throws Exception
contextHandlerC.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.getHeaders().put(HttpHeader.CONTENT_TYPE, "text/plain; charset=utf-8");
String msg = """
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerTest.java
index 04e2936c6be8..c65a5bff2e8a 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerTest.java
@@ -270,7 +270,7 @@ public void testSimpleInContext() throws Exception
Handler handler = new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
assertInContext(request);
scopeListener.assertInContext(request.getContext(), request);
@@ -306,7 +306,7 @@ public void testCallbackInContext() throws Exception
Handler handler = new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
assertInContext(request);
scopeListener.assertInContext(request.getContext(), request);
@@ -389,7 +389,7 @@ public void testBlockingInContext() throws Exception
Handler handler = new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
CountDownLatch latch = new CountDownLatch(1);
request.demand(() ->
@@ -443,7 +443,7 @@ public void testFunctionalInContext() throws Exception
Handler handler = new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
assertInContext(request);
scopeListener.assertInContext(request.getContext(), request);
@@ -548,17 +548,17 @@ public String getName()
}
@Test
- public void testThrownUsesContextErrorProcessor() throws Exception
+ public void testThrownUsesContextErrorHandler() throws Exception
{
_contextHandler.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
throw new RuntimeException("Testing");
}
});
- _contextHandler.setErrorProcessor(new ErrorProcessor()
+ _contextHandler.setErrorHandler(new ErrorHandler()
{
@Override
protected void writeErrorHtmlBody(Request request, Writer writer, int code, String message, Throwable cause, boolean showStacks) throws IOException
@@ -620,7 +620,7 @@ public void exitScope(Context context, Request request)
Handler handler = new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.setStatus(200);
response.write(true, null, callback);
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/DelayedHandlerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/DelayedHandlerTest.java
index 867f2255c4df..88c213a3132d 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/DelayedHandlerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/DelayedHandlerTest.java
@@ -129,10 +129,10 @@ protected void delay() throws Exception
delayedHandler.setHandler(new HelloHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
processing.countDown();
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
});
_server.start();
@@ -175,7 +175,7 @@ public void testDelayedUntilContent() throws Exception
delayedHandler.setHandler(new HelloHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
// Check that we are not called via any demand callback
ByteArrayOutputStream out = new ByteArrayOutputStream(8192);
@@ -187,7 +187,7 @@ public boolean process(Request request, Response response, Callback callback) th
DelayedHandler.UntilContentDelayedProcess.class.getMethod("onContent").getName()))));
processing.countDown();
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
});
_server.start();
@@ -232,7 +232,7 @@ public void testDelayedUntilContentInContext() throws Exception
delayedHandler.setHandler(new HelloHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
// Check that we are not called via any demand callback
ByteArrayOutputStream out = new ByteArrayOutputStream(8192);
@@ -250,7 +250,7 @@ public boolean process(Request request, Response response, Callback callback) th
assertThat(request.getContext(), sameInstance(context.getContext()));
processing.countDown();
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
});
_server.start();
@@ -292,20 +292,20 @@ public void testNoDelayWithContent() throws Exception
delayedHandler.setHandler(new HelloHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
// Check that we are called directly from HttpConnection.onFillable
ByteArrayOutputStream out = new ByteArrayOutputStream(8192);
new Throwable().printStackTrace(new PrintStream(out));
String stack = out.toString(StandardCharsets.ISO_8859_1);
assertThat(stack, containsString("org.eclipse.jetty.server.internal.HttpConnection.onFillable"));
- assertThat(stack, containsString("org.eclipse.jetty.server.handler.DelayedHandler.process"));
+ assertThat(stack, containsString("org.eclipse.jetty.server.handler.DelayedHandler.handle"));
// Check the content is available
String content = Content.Source.asString(request);
assertThat(content, equalTo("1234567890"));
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
});
_server.start();
@@ -355,7 +355,7 @@ protected void delay()
delayedHandler.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
return false;
}
@@ -393,7 +393,7 @@ public void testDelayedFormFields() throws Exception
delayedHandler.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
processing.countDown();
Fields fields = FormFields.from(request).get(1, TimeUnit.NANOSECONDS);
@@ -463,14 +463,14 @@ public void testNoDelayFormFields() throws Exception
delayedHandler.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
- // Check that we are called directly from HttpConnection.onFillable via DelayedHandler.process
+ // Check that we are called directly from HttpConnection.onFillable via DelayedHandler.handle().
ByteArrayOutputStream out = new ByteArrayOutputStream(8192);
new Throwable().printStackTrace(new PrintStream(out));
String stack = out.toString(StandardCharsets.ISO_8859_1);
assertThat(stack, containsString("org.eclipse.jetty.server.internal.HttpConnection.onFillable"));
- assertThat(stack, containsString("org.eclipse.jetty.server.handler.DelayedHandler.process"));
+ assertThat(stack, containsString("org.eclipse.jetty.server.handler.DelayedHandler.handle"));
Fields fields = FormFields.from(request).get(1, TimeUnit.NANOSECONDS);
Content.Sink.write(response, true, String.valueOf(fields), callback);
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/DumpHandler.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/DumpHandler.java
index 54695fed4a3d..2ff88caea7d7 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/DumpHandler.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/DumpHandler.java
@@ -57,7 +57,7 @@ public DumpHandler(String label)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if (LOG.isDebugEnabled())
LOG.debug("dump {}", request);
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/EchoHandler.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/EchoHandler.java
index 243dfdc36a23..9804d620ff59 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/EchoHandler.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/EchoHandler.java
@@ -34,7 +34,7 @@ public EchoHandler()
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
String contentType = request.getHeaders().get(HttpHeader.CONTENT_TYPE);
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/FileBufferedResponseHandlerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/FileBufferedResponseHandlerTest.java
index 205e25434034..caa89e71f99e 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/FileBufferedResponseHandlerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/FileBufferedResponseHandlerTest.java
@@ -99,7 +99,7 @@ public void testPathNotIncluded() throws Exception
_bufferedHandler.setHandler(new Handler.Abstract()
{
@Override
- public void process(Request request, Response response, Callback callback) throws Exception
+ public void handle(request request, Response response, Callback callback) throws Exception
{
response.setBufferSize(10);
PrintWriter writer = response.getWriter();
@@ -127,7 +127,7 @@ public void testIncludedByPath() throws Exception
_bufferedHandler.setHandler(new Handler.Abstract()
{
@Override
- public void process(Request request, Response response, Callback callback) throws Exception
+ public void handle(request request, Response response, Callback callback) throws Exception
{
response.setBufferSize(10);
PrintWriter writer = response.getWriter();
@@ -162,7 +162,7 @@ public void testExcludedByPath() throws Exception
_bufferedHandler.setHandler(new Handler.Abstract()
{
@Override
- public void process(Request request, Response response, Callback callback) throws Exception
+ public void handle(request request, Response response, Callback callback) throws Exception
{
response.setBufferSize(10);
PrintWriter writer = response.getWriter();
@@ -191,7 +191,7 @@ public void testExcludedByMime() throws Exception
_bufferedHandler.setHandler(new Handler.Abstract()
{
@Override
- public void process(Request request, Response response, Callback callback) throws Exception
+ public void handle(request request, Response response, Callback callback) throws Exception
{
response.setContentType(excludedMimeType);
response.setBufferSize(10);
@@ -220,7 +220,7 @@ public void testFlushed() throws Exception
_bufferedHandler.setHandler(new Handler.Abstract()
{
@Override
- public void process(Request request, Response response, Callback callback) throws Exception
+ public void handle(request request, Response response, Callback callback) throws Exception
{
response.setBufferSize(1024);
PrintWriter writer = response.getWriter();
@@ -258,7 +258,7 @@ public void testClosed() throws Exception
_bufferedHandler.setHandler(new Handler.Abstract()
{
@Override
- public void process(Request request, Response response, Callback callback) throws Exception
+ public void handle(request request, Response response, Callback callback) throws Exception
{
response.setBufferSize(10);
PrintWriter writer = response.getWriter();
@@ -296,7 +296,7 @@ public void testBufferSizeBig() throws Exception
_bufferedHandler.setHandler(new Handler.Abstract()
{
@Override
- public void process(Request request, Response response, Callback callback) throws Exception
+ public void handle(request request, Response response, Callback callback) throws Exception
{
response.setBufferSize(bufferSize);
PrintWriter writer = response.getWriter();
@@ -325,7 +325,7 @@ public void testFlushEmpty() throws Exception
_bufferedHandler.setHandler(new Handler.Abstract()
{
@Override
- public void process(Request request, Response response, Callback callback) throws Exception
+ public void handle(request request, Response response, Callback callback) throws Exception
{
response.setBufferSize(1024);
PrintWriter writer = response.getWriter();
@@ -359,7 +359,7 @@ public void testReset() throws Exception
_bufferedHandler.setHandler(new Handler.Abstract()
{
@Override
- public void process(Request request, Response response, Callback callback) throws Exception
+ public void handle(request request, Response response, Callback callback) throws Exception
{
response.setBufferSize(8);
PrintWriter writer = response.getWriter();
@@ -408,7 +408,7 @@ public void testFileLargerThanMaxInteger() throws Exception
_bufferedHandler.setHandler(new Handler.Abstract()
{
@Override
- public void process(Request request, Response response, Callback callback) throws Exception
+ public void handle(request request, Response response, Callback callback) throws Exception
{
ServletOutputStream outputStream = response.getOutputStream();
@@ -510,7 +510,7 @@ public HttpOutput.Interceptor getNextInterceptor()
_bufferedHandler.setHandler(new Handler.Abstract()
{
@Override
- public void process(Request request, Response response, Callback callback) throws Exception
+ public void handle(request request, Response response, Callback callback) throws Exception
{
byte[] chunk1 = "this content will ".getBytes();
byte[] chunk2 = "be buffered in a file".getBytes();
@@ -569,7 +569,7 @@ public void testFileWriteFailed() throws Exception
_bufferedHandler.setHandler(new Handler.Abstract()
{
@Override
- public void process(Request request, Response response, Callback callback) throws Exception
+ public void handle(request request, Response response, Callback callback) throws Exception
{
ServletOutputStream outputStream = response.getOutputStream();
byte[] content = "this content will be buffered in a file".getBytes();
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/HandlerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/HandlerTest.java
index dba32a8707d7..736b0a46373d 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/HandlerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/HandlerTest.java
@@ -269,7 +269,7 @@ public void testInsertWrapperBadChain()
c.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
return false;
}
@@ -287,7 +287,7 @@ public void testSetServerPropagation()
Handler handler = new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
return false;
}
@@ -310,7 +310,7 @@ public void testSetHandlerServerPropagation()
Handler handler = new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
return false;
}
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/HelloHandler.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/HelloHandler.java
index d43b78f47709..de1cf6d10dff 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/HelloHandler.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/HelloHandler.java
@@ -46,7 +46,7 @@ public String getMessage()
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
response.getHeaders().put(HttpHeader.CONTENT_TYPE, MimeTypes.Type.TEXT_PLAIN_UTF_8.asString());
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/InetAccessHandlerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/InetAccessHandlerTest.java
index da2233751aa0..09b51ccc38a2 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/InetAccessHandlerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/InetAccessHandlerTest.java
@@ -61,7 +61,7 @@ public static void setUp() throws Exception
_handler.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
callback.succeeded();
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/MultiPartFormDataHandlerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/MultiPartFormDataHandlerTest.java
index 59ebda222c66..a0e8e7f7cfa7 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/MultiPartFormDataHandlerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/MultiPartFormDataHandlerTest.java
@@ -73,7 +73,7 @@ public void testSimpleMultiPart() throws Exception
start(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
String boundary = MultiPart.extractBoundary(request.getHeaders().get(HttpHeader.CONTENT_TYPE));
new MultiPartFormData(boundary).parse(request)
@@ -123,7 +123,7 @@ public void testDelayedUntilFormData() throws Exception
delayedHandler.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
processLatch.countDown();
MultiPartFormData.Parts parts = (MultiPartFormData.Parts)request.getAttribute(MultiPartFormData.Parts.class.getName());
@@ -160,18 +160,18 @@ public boolean process(Request request, Response response, Callback callback) th
client.write(UTF_8.encode(header));
client.write(UTF_8.encode(contentBegin));
- // Verify that the processor has not been called yet.
+ // Verify that the handler has not been called yet.
assertFalse(processLatch.await(1, TimeUnit.SECONDS));
client.write(UTF_8.encode(contentMiddle));
- // Verify that the processor has not been called yet.
+ // Verify that the handler has not been called yet.
assertFalse(processLatch.await(1, TimeUnit.SECONDS));
// Finish to send the content.
client.write(UTF_8.encode(contentEnd));
- // Verify that the processor has been called.
+ // Verify that the handler has been called.
assertTrue(processLatch.await(5, TimeUnit.SECONDS));
HttpTester.Response response = HttpTester.parseResponse(HttpTester.from(client));
@@ -187,7 +187,7 @@ public void testEchoMultiPart() throws Exception
start(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
String boundary = MultiPart.extractBoundary(request.getHeaders().get(HttpHeader.CONTENT_TYPE));
new MultiPartFormData(boundary).parse(request)
@@ -251,7 +251,7 @@ public void testAsyncMultiPartResponse(@TempDir Path tempDir) throws Exception
start(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
String boundary = "A1B2C3";
response.getHeaders().put(HttpHeader.CONTENT_TYPE, "multipart/form-data; boundary=\"%s\"".formatted(boundary));
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/PathMappingsHandlerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/PathMappingsHandlerTest.java
index afcd0083c79b..0b6fc77a62fb 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/PathMappingsHandlerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/PathMappingsHandlerTest.java
@@ -266,7 +266,7 @@ public SimpleHandler(String message)
}
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
assertTrue(isStarted());
response.setStatus(HttpStatus.OK_200);
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ShutdownHandlerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ShutdownHandlerTest.java
index 620d14d310da..ba63fc05ad00 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ShutdownHandlerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ShutdownHandlerTest.java
@@ -166,10 +166,10 @@ public FakeRemoteAddressHandlerWrapper(InetSocketAddress fakeRemoteAddress)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
Request fakedRequest = FakeRemoteAddressRequest.from(request, this.fakeRemoteAddress);
- return super.process(fakedRequest, response, callback);
+ return super.handle(fakedRequest, response, callback);
}
}
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/StatisticsHandlerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/StatisticsHandlerTest.java
index 191ee4589401..57218f1770dd 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/StatisticsHandlerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/StatisticsHandlerTest.java
@@ -90,14 +90,14 @@ public void testMinimumDataReadRateHandler() throws Exception
mdrh.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
while (true)
{
Content.Chunk chunk = request.read();
if (chunk == null)
{
- request.demand(() -> process(request, response, callback));
+ request.demand(() -> handle(request, response, callback));
return true;
}
@@ -119,9 +119,9 @@ public boolean process(Request request, Response response, Callback callback)
_latchHandler.setHandler(mdrh);
AtomicReference messageRef = new AtomicReference<>();
- _server.setErrorProcessor((request, response, callback) ->
+ _server.setErrorHandler((request, response, callback) ->
{
- messageRef.set((String)request.getAttribute(ErrorProcessor.ERROR_MESSAGE));
+ messageRef.set((String)request.getAttribute(ErrorHandler.ERROR_MESSAGE));
callback.succeeded();
return true;
});
@@ -163,7 +163,7 @@ public void testMinimumDataWriteRateHandler() throws Exception
mdrh.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
write(response, 0, new Callback()
{
@@ -245,7 +245,7 @@ public void failed(Throwable x)
public void testTwoRequestsSerially() throws Exception
{
CyclicBarrier[] barrier = {new CyclicBarrier(2), new CyclicBarrier(2), new CyclicBarrier(2)};
- _statsHandler.setHandler(new TripleBarrierHandlerProcessor(barrier));
+ _statsHandler.setHandler(new TripleBarrierHandler(barrier));
_server.start();
String request = """
@@ -302,7 +302,7 @@ public void testTwoRequestsInParallel() throws Exception
{
CyclicBarrier[] barrier = {new CyclicBarrier(3), new CyclicBarrier(3), new CyclicBarrier(3)};
_latchHandler.reset(2);
- _statsHandler.setHandler(new TripleBarrierHandlerProcessor(barrier));
+ _statsHandler.setHandler(new TripleBarrierHandler(barrier));
_server.start();
String request = """
@@ -337,7 +337,7 @@ public void testProcessingIncrementThenAcceptingIncrement() throws Exception
_statsHandler.setHandler(new Handler.Abstract(Invocable.InvocationType.BLOCKING)
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
barrier[0].await();
barrier[1].await();
@@ -390,7 +390,7 @@ public void testThrownInProcess() throws Exception
_statsHandler.setHandler(new Handler.Abstract(Invocable.InvocationType.BLOCKING)
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
throw new IllegalStateException("expected");
}
@@ -418,7 +418,7 @@ public boolean process(Request request, Response response, Callback callback)
assertEquals(0, _statsHandler.getResponses3xx());
assertEquals(0, _statsHandler.getResponses4xx());
assertEquals(1, _statsHandler.getResponses5xx());
- assertEquals(1, _statsHandler.getProcessingErrors());
+ assertEquals(1, _statsHandler.getHandlingFailures());
}
@Test
@@ -427,7 +427,7 @@ public void testThrownInProcessAfterCallback() throws Exception
_statsHandler.setHandler(new Handler.Abstract(Invocable.InvocationType.BLOCKING)
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
callback.succeeded();
throw new IllegalStateException("expected");
@@ -457,7 +457,7 @@ public boolean process(Request request, Response response, Callback callback)
assertEquals(0, _statsHandler.getResponses3xx());
assertEquals(0, _statsHandler.getResponses4xx());
assertEquals(0, _statsHandler.getResponses5xx());
- assertEquals(1, _statsHandler.getProcessingErrors());
+ assertEquals(1, _statsHandler.getHandlingFailures());
}
@Test
@@ -467,13 +467,13 @@ public void testHandlingProcessingTime() throws Exception
final long acceptedTime = 500;
final long wastedTime = 250;
final long requestTime = acceptingTime + acceptedTime;
- final long processTime = acceptingTime + acceptedTime + wastedTime;
+ final long handleTime = acceptingTime + acceptedTime + wastedTime;
final CyclicBarrier[] barrier = {new CyclicBarrier(2), new CyclicBarrier(2), new CyclicBarrier(2)};
_statsHandler.setHandler(new Handler.Abstract(Invocable.InvocationType.BLOCKING)
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
barrier[0].await();
Thread.sleep(acceptingTime);
@@ -528,7 +528,7 @@ public boolean process(Request request, Response response, Callback callback) th
// TODO currently the wasted time is included in the request time and the accepted time, because those
// timers are stopped in the stream completion (rather than the callback completion), which is
- // serialized on the return of the call to process. Perhaps we should wrap the callback for
+ // serialized on the return of the call to handle. Perhaps we should wrap the callback for
// those times?
assertThat(_statsHandler.getRequestTimeTotal(), allOf(
@@ -547,12 +547,12 @@ private static class LatchHandler extends Handler.Wrapper
private volatile CountDownLatch _latch = new CountDownLatch(1);
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
CountDownLatch latch = _latch;
try
{
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
finally
{
@@ -577,15 +577,15 @@ private boolean await() throws InterruptedException
}
/**
- * when the first barrier is reached, process() has been entered;
+ * when the first barrier is reached, handle() has been entered;
* when the second barrier is reached, the callback is succeeded;
- * when the third barrier is reached, process() is returning
+ * when the third barrier is reached, handle() is returning
*/
- private static class TripleBarrierHandlerProcessor extends Handler.Abstract
+ private static class TripleBarrierHandler extends Handler.Abstract
{
private final CyclicBarrier[] _barriers;
- public TripleBarrierHandlerProcessor(CyclicBarrier[] barriers)
+ public TripleBarrierHandler(CyclicBarrier[] barriers)
{
if (barriers.length != 3)
throw new IllegalArgumentException();
@@ -593,7 +593,7 @@ public TripleBarrierHandlerProcessor(CyclicBarrier[] barriers)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
try
{
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ThreadLimitHandlerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ThreadLimitHandlerTest.java
index 1bff8f3b780d..80146c46581f 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ThreadLimitHandlerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ThreadLimitHandlerTest.java
@@ -83,7 +83,7 @@ protected int getThreadLimit(String ip)
handler.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.setStatus(HttpStatus.OK_200);
callback.succeeded();
@@ -122,7 +122,7 @@ protected int getThreadLimit(String ip)
handler.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.setStatus(HttpStatus.OK_200);
callback.succeeded();
@@ -165,7 +165,7 @@ protected int getThreadLimit(String ip)
handler.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.setStatus(HttpStatus.OK_200);
callback.succeeded();
@@ -205,7 +205,7 @@ public void testLimit() throws Exception
handler.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(HttpStatus.OK_200);
if (!"/other".equals(Request.getPathInContext(request)))
@@ -263,7 +263,7 @@ public void testDemandLimit() throws Exception
handler.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
processed.countDown();
Runnable onContent = new Runnable()
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/TryPathsHandlerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/TryPathsHandlerTest.java
index 683c053aa140..643054016b2f 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/TryPathsHandlerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/TryPathsHandlerTest.java
@@ -110,7 +110,7 @@ protected HttpContent.Factory newHttpContentFactory()
resourceHandler.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
if (!Request.getPathInContext(request).startsWith("/forward"))
return false;
@@ -182,7 +182,7 @@ protected HttpContent.Factory newHttpContentFactory()
pathMappingsHandler.addMapping(new ServletPathSpec("*.php"), new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(HttpStatus.OK_200);
response.getHeaders().put(HttpHeader.CONTENT_TYPE, "text/plain; charset=utf-8");
@@ -194,7 +194,7 @@ public boolean process(Request request, Response response, Callback callback) th
pathMappingsHandler.addMapping(new ServletPathSpec("/forward"), new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
assertThat(Request.getPathInContext(request), equalTo("/forward"));
assertThat(request.getHttpURI().getQuery(), equalTo("p=/last"));
@@ -271,7 +271,7 @@ protected HttpContent.Factory newHttpContentFactory()
resourceHandler.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
if (Request.getPathInContext(request).endsWith("/notFound"))
{
@@ -348,7 +348,7 @@ public void testSecureRequestIsForwarded() throws Exception
start(List.of("$path"), new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
HttpURI httpURI = request.getHttpURI();
assertEquals("https", httpURI.getScheme());
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipHandlerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipHandlerTest.java
index 956c6f3fe7c5..9591b7d99972 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipHandlerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipHandlerTest.java
@@ -1740,7 +1740,7 @@ private HttpTester.Response sendGzipRequest(String uri, String data) throws Exce
public static class MimeTypeContentHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
String pathInfo = Request.getPathInContext(request);
response.getHeaders().put(HttpHeader.CONTENT_TYPE, getContentTypeFromRequest(pathInfo, request));
@@ -1766,7 +1766,7 @@ private String getContentTypeFromRequest(String filename, Request request)
public static class TestHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if (HttpMethod.DELETE.is(request.getMethod()))
{
@@ -1803,7 +1803,7 @@ void doDelete(Request request, Response response, Callback callback) throws IOEx
public static class WriteHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
Fields parameters = Request.extractQueryParameters(request);
@@ -1893,7 +1893,7 @@ public ChunkedWriteHandler setEtag(String etag)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if (StringUtil.isNotBlank(etag))
{
@@ -1941,7 +1941,7 @@ public SingleWriteHandler setEtag(String etag)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if (StringUtil.isNotBlank(etag))
{
@@ -1962,7 +1962,7 @@ public boolean process(Request request, Response response, Callback callback) th
public static class EchoHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
HttpField contentType = request.getHeaders().getField(HttpHeader.CONTENT_TYPE);
if (contentType != null)
@@ -1976,7 +1976,7 @@ public boolean process(Request request, Response response, Callback callback) th
public static class DumpHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.getHeaders().put(HttpHeader.CONTENT_TYPE, "text/plain");
@@ -2002,13 +2002,13 @@ public static class UncompressedMetadata
public static class CheckHandler extends Handler.Wrapper
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if (request.getHeaders().get("X-Content-Encoding") != null)
assertEquals(-1, request.getLength());
else if (request.getLength() >= 0)
MatcherAssert.assertThat(request.getHeaders().get("X-Content-Encoding"), nullValue());
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
}
}
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLCloseTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLCloseTest.java
index ec743a9134c2..a36faa374e44 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLCloseTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLCloseTest.java
@@ -103,7 +103,7 @@ public void testClose() throws Exception
private static class WriteHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
response.getHeaders().put("test", "value");
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLEngineTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLEngineTest.java
index 393cc6c5dfe6..24d27772cdba 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLEngineTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLEngineTest.java
@@ -367,7 +367,7 @@ private static String readResponse(Socket client) throws IOException
private static class TestHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
// System.err.println("HANDLE "+request.getRequestURI());
SecureRequestCustomizer.SslSessionData sslData = (SecureRequestCustomizer.SslSessionData)
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLReadEOFAfterResponseTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLReadEOFAfterResponseTest.java
index cffb242f0739..198c967ac4df 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLReadEOFAfterResponseTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLReadEOFAfterResponseTest.java
@@ -78,7 +78,7 @@ public void testReadEOFAfterResponse() throws Exception
server.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
// First: read the whole content exactly
int length = bytes.length;
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLSelectChannelConnectorLoadTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLSelectChannelConnectorLoadTest.java
index 0b21d19fd86c..e8fb76972a0b 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLSelectChannelConnectorLoadTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLSelectChannelConnectorLoadTest.java
@@ -319,7 +319,7 @@ else if (line.length() == 0)
private static class TestHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
ByteBuffer input = Content.Source.asByteBuffer(request);
response.write(true, BufferUtil.toBuffer(String.valueOf(input.remaining()).getBytes()), callback);
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/ServerConnectorSslServerTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/ServerConnectorSslServerTest.java
index d5aef65fefd0..658800f4cdb2 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/ServerConnectorSslServerTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/ServerConnectorSslServerTest.java
@@ -212,7 +212,7 @@ public void testSecureRequestCustomizer() throws Exception
public static class SecureRequestHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
StringBuilder out = new StringBuilder();
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SlowClientsTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SlowClientsTest.java
index a6e2750c1e37..47d78bf13c8b 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SlowClientsTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SlowClientsTest.java
@@ -96,7 +96,7 @@ public void testSlowClientsWithSmallThreadPool() throws Exception
startServer(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.write(true, BufferUtil.toBuffer(contentLength), callback);
return true;
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SniSslConnectionFactoryTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SniSslConnectionFactoryTest.java
index bdc6c64e9b61..792b2847dc7c 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SniSslConnectionFactoryTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SniSslConnectionFactoryTest.java
@@ -100,7 +100,7 @@ private void start(BiConsumer
Handler.Singleton xCertHandler = new Handler.Wrapper()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
EndPoint endPoint = request.getConnectionMetaData().getConnection().getEndPoint();
SslConnection.SslEndPoint sslEndPoint = (SslConnection.SslEndPoint)endPoint;
@@ -109,7 +109,7 @@ public boolean process(Request request, Response response, Callback callback) th
SSLSession session = sslEngine.getSession();
for (Certificate c : session.getLocalCertificates())
response.getHeaders().add("X-CERT", ((X509Certificate)c).getSubjectDN().toString());
- return getHandler().process(request, response, callback);
+ return getHandler().handle(request, response, callback);
}
};
@@ -130,7 +130,7 @@ public boolean process(Request request, Response response, Callback callback) th
xCertHandler.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
response.getHeaders().put("X-URL", Request.getPathInContext(request));
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SslConnectionFactoryTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SslConnectionFactoryTest.java
index 14a0b668e895..ebe49e17e0e1 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SslConnectionFactoryTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SslConnectionFactoryTest.java
@@ -93,7 +93,7 @@ public void before() throws Exception
_server.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.setStatus(200);
response.write(true, BufferUtil.toBuffer("url=" + request.getHttpURI() + "\nhost=" + Request.getServerName(request)), callback);
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SslContextFactoryReloadTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SslContextFactoryReloadTest.java
index 1f8e23fe54cb..e8f0801e9abe 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SslContextFactoryReloadTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SslContextFactoryReloadTest.java
@@ -248,10 +248,10 @@ public void run()
private static class TestHandler extends EchoHandler
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if (HttpMethod.POST.is(request.getMethod()))
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
else
processNoContent(request, response, callback);
return true;
diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SslUploadTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SslUploadTest.java
index f4bce1c510f2..a12b6e6fb408 100644
--- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SslUploadTest.java
+++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SslUploadTest.java
@@ -128,7 +128,7 @@ public void testUpload() throws Exception
private static class EmptyHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
ByteBuffer input = Content.Source.asByteBuffer(request);
response.write(true, BufferUtil.toBuffer(("Read " + input.remaining()).getBytes()), callback);
diff --git a/jetty-core/jetty-session/src/test/java/org/eclipse/jetty/session/SimpleSessionHandler.java b/jetty-core/jetty-session/src/test/java/org/eclipse/jetty/session/SimpleSessionHandler.java
index 575a59500330..79dc2b37ddc0 100644
--- a/jetty-core/jetty-session/src/test/java/org/eclipse/jetty/session/SimpleSessionHandler.java
+++ b/jetty-core/jetty-session/src/test/java/org/eclipse/jetty/session/SimpleSessionHandler.java
@@ -57,7 +57,7 @@ public Server getServer()
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
Handler next = getHandler();
if (next == null)
@@ -137,7 +137,7 @@ public boolean process(Handler handler, Response response, Callback callback) th
Response.replaceCookie(_response, cookie);
}
- return handler.process(this, _response, callback);
+ return handler.handle(this, _response, callback);
}
}
diff --git a/jetty-core/jetty-session/src/test/java/org/eclipse/jetty/session/SimpleSessionHandlerTest.java b/jetty-core/jetty-session/src/test/java/org/eclipse/jetty/session/SimpleSessionHandlerTest.java
index fc7bfc6cc17a..804de4bb5160 100644
--- a/jetty-core/jetty-session/src/test/java/org/eclipse/jetty/session/SimpleSessionHandlerTest.java
+++ b/jetty-core/jetty-session/src/test/java/org/eclipse/jetty/session/SimpleSessionHandlerTest.java
@@ -62,7 +62,7 @@ public void beforeEach() throws Exception
sessionManager.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
String pathInContext = Request.getPathInContext(request);
String[] split = pathInContext.substring(1).split("/");
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/AsyncRequestContentTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/AsyncRequestContentTest.java
index ef6fdd0a8d56..27bda51bba59 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/AsyncRequestContentTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/AsyncRequestContentTest.java
@@ -208,7 +208,7 @@ public void testBufferReuseAfterCallbackCompleted(Transport transport) throws Ex
private static class ConsumeInputHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
Content.Source.consumeAll(request);
response.setStatus(HttpStatus.OK_200);
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/ConnectionStatisticsTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/ConnectionStatisticsTest.java
index 5a4c98ac6576..8cabf12a5fba 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/ConnectionStatisticsTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/ConnectionStatisticsTest.java
@@ -50,7 +50,7 @@ public void testConnectionStatistics(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
Content.copy(request, response, callback);
return true;
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/EmptyServerHandler.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/EmptyServerHandler.java
index 30a0c5e008e8..169f7755677f 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/EmptyServerHandler.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/EmptyServerHandler.java
@@ -21,7 +21,7 @@
public class EmptyServerHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
callback.succeeded();
return true;
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/ForwardProxyWithDynamicTransportTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/ForwardProxyWithDynamicTransportTest.java
index 7da33fe6a320..aa4320ab692b 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/ForwardProxyWithDynamicTransportTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/ForwardProxyWithDynamicTransportTest.java
@@ -250,7 +250,7 @@ public void testProxy(Origin.Protocol proxyProtocol, boolean proxySecure, HttpVe
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.setStatus(status);
callback.succeeded();
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientDemandTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientDemandTest.java
index 7a8e4f883b60..aee591fa1131 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientDemandTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientDemandTest.java
@@ -72,7 +72,7 @@ public void testDemandInTwoChunks(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
try
{
@@ -131,7 +131,7 @@ public void testDemand(Transport transport) throws Exception
startServer(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
response.getHeaders().putLongField(HttpHeader.CONTENT_LENGTH, content.length);
response.write(true, ByteBuffer.wrap(content), callback);
@@ -218,7 +218,7 @@ public void testContentWhileStalling(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
try
{
@@ -313,7 +313,7 @@ public void testTwoListenersWithDifferentDemand(Transport transport) throws Exce
startServer(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
response.getHeaders().putLongField(HttpHeader.CONTENT_LENGTH, bytes.length);
response.write(true, ByteBuffer.wrap(bytes), callback);
@@ -391,7 +391,7 @@ public void testGZippedResponseContentWithAsyncDemand(Transport transport) throw
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
response.getHeaders().put(HttpHeader.CONTENT_ENCODING, HttpHeaderValue.GZIP);
try (GZIPOutputStream gzip = new GZIPOutputStream(Content.Sink.asOutputStream(response)))
@@ -437,7 +437,7 @@ public void testDelayedBeforeContentDemand(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
response.getHeaders().putLongField(HttpHeader.CONTENT_LENGTH, content.length);
response.write(true, ByteBuffer.wrap(content), callback);
@@ -569,7 +569,7 @@ public void onContentSource(Response response, Content.Source contentSource)
public void testReadDemandInSpawnedThread(Transport transport) throws Exception
{
int totalBytes = 1024;
- start(transport, new TestProcessor(totalBytes));
+ start(transport, new TestHandler(totalBytes));
List chunks = new CopyOnWriteArrayList<>();
CountDownLatch resultLatch = new CountDownLatch(1);
@@ -621,17 +621,17 @@ public void run()
}
}
- private static class TestProcessor extends Handler.Abstract
+ private static class TestHandler extends Handler.Abstract
{
private final int totalBytes;
- private TestProcessor(int totalBytes)
+ private TestHandler(int totalBytes)
{
this.totalBytes = totalBytes;
}
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
response.getHeaders().put(HttpHeader.CONTENT_TYPE, "text/plain");
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientIdleTimeoutTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientIdleTimeoutTest.java
index 7bed57247716..8ffc344c9e6a 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientIdleTimeoutTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientIdleTimeoutTest.java
@@ -39,7 +39,7 @@ public void testClientIdleTimeout(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
// Do not succeed the callback if it's a timeout request.
if (!Request.getPathInContext(request).equals("/timeout"))
@@ -74,7 +74,7 @@ public void testRequestIdleTimeout(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
// Do not succeed the callback if it's a timeout request.
if (!Request.getPathInContext(request).equals("/timeout"))
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientLoadTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientLoadTest.java
index 56efab4552ec..02decf30c445 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientLoadTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientLoadTest.java
@@ -300,7 +300,7 @@ private boolean await(CountDownLatch latch, long timeMs)
private static class LoadHandler extends Handler.Abstract
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
String timeout = request.getHeaders().get("X-Timeout");
if (timeout != null)
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientStreamTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientStreamTest.java
index d1c3c4bccfe3..c22faf9fa7dd 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientStreamTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientStreamTest.java
@@ -98,7 +98,7 @@ public void testFileUpload(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
response.setStatus(200);
response.getHeaders().putLongField(HttpHeader.CONTENT_LENGTH, 0);
@@ -137,7 +137,7 @@ public void testDownload(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
response.write(true, ByteBuffer.wrap(data), callback);
return true;
@@ -178,7 +178,7 @@ public void testDownloadOfUTF8Content(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
response.write(true, ByteBuffer.wrap(data), callback);
return true;
@@ -220,7 +220,7 @@ public void testDownloadWithFailure(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
// Say we want to send this much...
response.getHeaders().putLongField(HttpHeader.CONTENT_LENGTH, 2 * data.length);
@@ -268,7 +268,7 @@ public void testInputStreamResponseListenerClosedBeforeReading(Transport transpo
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
Content.copy(request, response, callback);
return true;
@@ -297,7 +297,7 @@ public void testInputStreamResponseListenerClosedBeforeContent(Transport transpo
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
contextRef.set(new HandlerContext(request, response, callback));
Content.Sink.write(response, false, null);
@@ -341,7 +341,7 @@ public void testInputStreamResponseListenerClosedWhileWaiting(Transport transpor
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
response.getHeaders().putLongField(HttpHeader.CONTENT_LENGTH, chunk1.length + chunk2.length);
Content.Sink.write(response, false, ByteBuffer.wrap(chunk1));
@@ -391,7 +391,7 @@ public void testInputStreamResponseListenerFailedWhileWaiting(Transport transpor
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
byte[] data = new byte[1024];
response.getHeaders().putLongField(HttpHeader.CONTENT_LENGTH, data.length);
@@ -460,7 +460,7 @@ public void testInputStreamContentProviderThrowingWhileReading(Transport transpo
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
Content.copy(request, response, callback);
return true;
@@ -497,7 +497,7 @@ public void testDownloadWithCloseBeforeContent(Transport transport) throws Excep
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
Content.Sink.write(response, false, null);
@@ -541,7 +541,7 @@ public void testDownloadWithCloseMiddleOfContent(Transport transport) throws Exc
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
Content.Sink.write(response, false, ByteBuffer.wrap(data1));
@@ -589,7 +589,7 @@ public void testDownloadWithCloseEndOfContent(Transport transport) throws Except
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
response.write(true, ByteBuffer.wrap(data), callback);
return true;
@@ -627,7 +627,7 @@ public void testUploadWithDeferredContentProviderFromInputStream(Transport trans
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
Content.copy(request, response, callback);
return true;
@@ -670,7 +670,7 @@ public void testUploadWithDeferredContentAvailableCallbacksNotifiedOnce(Transpor
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
Content.copy(request, response, callback);
return true;
@@ -710,7 +710,7 @@ public void testUploadWithDeferredContentProviderRacingWithSend(Transport transp
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
Content.copy(request, response, callback);
return true;
@@ -755,7 +755,7 @@ public void testUploadWithOutputStream(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
Content.copy(request, response, callback);
return true;
@@ -797,7 +797,7 @@ public void testBigUploadWithOutputStreamFromInputStream(Transport transport) th
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
Content.copy(request, response, callback);
return true;
@@ -960,7 +960,7 @@ public void testUploadWithConcurrentServerCloseClosesStream(Transport transport)
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
serverLatch.countDown();
// Do not complete the callback.
@@ -1033,7 +1033,7 @@ public void testInputStreamResponseListenerBufferedRead(Transport transport) thr
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
contextRef.set(new HandlerContext(request, response, callback));
latch.countDown();
@@ -1082,7 +1082,7 @@ public void testInputStreamResponseListenerWithRedirect(Transport transport) thr
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
if (Request.getPathInContext(request).startsWith("/303"))
org.eclipse.jetty.server.Response.sendRedirect(request, response, callback, "/200");
@@ -1116,7 +1116,7 @@ public void testMultiplexedConnectionsForcibleStop(Transport transport) throws E
startServer(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
processCount.incrementAndGet();
processLatch.await(timeoutInSeconds * 2, TimeUnit.SECONDS);
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientTest.java
index c0ce9571e962..395c5cfa2365 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientTest.java
@@ -85,7 +85,7 @@ public void testRequestWithoutResponseContent(Transport transport) throws Except
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
response.setStatus(status);
callback.succeeded();
@@ -122,7 +122,7 @@ private void testRequestWithResponseContent(Transport transport, int length) thr
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
response.getHeaders().putLongField(HttpHeader.CONTENT_LENGTH, length);
response.write(true, ByteBuffer.wrap(bytes), callback);
@@ -166,7 +166,7 @@ private void testRequestWithResponseContentChunked(Transport transport, int leng
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
Content.Sink.write(response, false, ByteBuffer.wrap(chunk1));
response.write(true, ByteBuffer.wrap(chunk2), callback);
@@ -211,7 +211,7 @@ private void testUploadWithoutResponseContent(Transport transport, int length) t
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
InputStream input = Request.asInputStream(request);
for (byte b : bytes)
@@ -241,7 +241,7 @@ public void testClientManyWritesSlowServer(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
long sleep = 1024;
long total = 0;
@@ -297,7 +297,7 @@ public void testRequestAfterFailedRequest(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
response.write(true, ByteBuffer.allocate(length), callback);
return true;
@@ -378,7 +378,7 @@ public void testOPTIONS(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
assertTrue(HttpMethod.OPTIONS.is(request.getMethod()));
assertEquals("*", Request.getPathInContext(request));
@@ -403,7 +403,7 @@ public void testOPTIONSWithRelativeRedirect(Transport transport) throws Exceptio
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
if ("*".equals(Request.getPathInContext(request)))
{
@@ -434,7 +434,7 @@ public void testDownloadWithInputStreamResponseListener(Transport transport) thr
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
Content.Sink.write(response, true, content, callback);
return true;
@@ -501,7 +501,7 @@ public void testAsyncResponseContentBackPressure(Transport transport) throws Exc
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
// Large write to generate multiple DATA frames.
response.write(true, ByteBuffer.allocate(256 * 1024), callback);
@@ -544,7 +544,7 @@ public void testResponseWithContentCompleteListenerInvokedOnce(Transport transpo
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
Content.Sink.write(response, true, "Jetty", callback);
return true;
@@ -581,7 +581,7 @@ private void testHEAD(Transport transport, String path, int status) throws Excep
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
String target = Request.getPathInContext(request);
if ("/notMapped".equals(target))
@@ -609,7 +609,7 @@ public void testHEADWithAcceptHeaderAndSendError(Transport transport) throws Exc
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
org.eclipse.jetty.server.Response.writeError(request, response, callback, status);
return true;
@@ -633,7 +633,7 @@ public void testHEADWithContentLengthGreaterThanMaxBufferingCapacity(Transport t
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
response.getHeaders().putLongField(HttpHeader.CONTENT_LENGTH, length);
response.write(true, ByteBuffer.allocate(length), callback);
@@ -683,7 +683,7 @@ public void testIPv6Host(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
response.getHeaders().put(HttpHeader.CONTENT_TYPE, "text/plain");
Content.Sink.write(response, true, request.getHeaders().get(HttpHeader.HOST), callback);
@@ -740,7 +740,7 @@ public void testRequestWithDifferentDestination(Transport transport) throws Exce
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
HttpURI uri = request.getHttpURI();
assertEquals(requestHost, uri.getHost());
@@ -781,7 +781,7 @@ public void testRequestIdleTimeout(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
String target = Request.getPathInContext(request);
if (target.equals("/1"))
@@ -818,7 +818,7 @@ else if (target.equals("/2"))
public void testContentSourceListeners(Transport transport) throws Exception
{
int totalBytes = 1024;
- start(transport, new TestProcessor(totalBytes));
+ start(transport, new TestHandler(totalBytes));
List chunks = new CopyOnWriteArrayList<>();
CompleteContentSourceListener listener = new CompleteContentSourceListener()
@@ -844,7 +844,7 @@ public void onContentSource(Response response, Content.Source contentSource)
public void testContentSourceListenersFailure(Transport transport) throws Exception
{
int totalBytes = 1024;
- start(transport, new TestProcessor(totalBytes));
+ start(transport, new TestHandler(totalBytes));
CompleteContentSourceListener listener = new CompleteContentSourceListener()
{
@@ -868,7 +868,7 @@ public void onContentSource(Response response, Content.Source contentSource)
public void testContentSourceListenerDemandInSpawnedThread(Transport transport) throws Exception
{
int totalBytes = 1024;
- start(transport, new TestProcessor(totalBytes));
+ start(transport, new TestHandler(totalBytes));
List chunks = new CopyOnWriteArrayList<>();
CompleteContentSourceListener listener = new CompleteContentSourceListener()
@@ -895,7 +895,7 @@ public void onContentSource(Response response, Content.Source contentSource)
public void testParallelContentSourceListeners(Transport transport) throws Exception
{
int totalBytes = 1024;
- start(transport, new TestProcessor(totalBytes));
+ start(transport, new TestHandler(totalBytes));
List chunks1 = new CopyOnWriteArrayList<>();
List chunks2 = new CopyOnWriteArrayList<>();
@@ -924,7 +924,7 @@ public void testParallelContentSourceListeners(Transport transport) throws Excep
public void testParallelContentSourceListenersPartialFailure(Transport transport) throws Exception
{
int totalBytes = 1024;
- start(transport, new TestProcessor(totalBytes));
+ start(transport, new TestHandler(totalBytes));
List chunks1 = new CopyOnWriteArrayList<>();
List chunks2 = new CopyOnWriteArrayList<>();
@@ -958,7 +958,7 @@ public void testParallelContentSourceListenersPartialFailure(Transport transport
public void testParallelContentSourceListenersPartialFailureInSpawnedThread(Transport transport) throws Exception
{
int totalBytes = 1024;
- start(transport, new TestProcessor(totalBytes));
+ start(transport, new TestHandler(totalBytes));
List chunks1 = new CopyOnWriteArrayList<>();
List chunks2 = new CopyOnWriteArrayList<>();
@@ -999,7 +999,7 @@ public void testParallelContentSourceListenersPartialFailureInSpawnedThread(Tran
@MethodSource("transports")
public void testParallelContentSourceListenersTotalFailure(Transport transport) throws Exception
{
- start(transport, new TestProcessor(1024));
+ start(transport, new TestHandler(1024));
CompleteContentSourceListener listener = new CompleteContentSourceListener()
{
@@ -1080,17 +1080,17 @@ private static Content.Chunk duplicate(Content.Chunk chunk)
}
}
- private static class TestProcessor extends Handler.Abstract
+ private static class TestHandler extends Handler.Abstract
{
private final int totalBytes;
- private TestProcessor(int totalBytes)
+ private TestHandler(int totalBytes)
{
this.totalBytes = totalBytes;
}
@Override
- public boolean process(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
response.getHeaders().put(HttpHeader.CONTENT_TYPE, "text/plain");
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientTimeoutTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientTimeoutTest.java
index ea0e7e16c250..5ce310c2c9f8 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientTimeoutTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientTimeoutTest.java
@@ -430,7 +430,7 @@ public void testFirstRequestTimeoutAfterSecondRequestCompletes(Transport transpo
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
if (org.eclipse.jetty.server.Request.getPathInContext(request).startsWith("/one"))
Thread.sleep(3 * timeout);
@@ -467,7 +467,7 @@ public void testRequestQueuedDoesNotCancelTimeoutOfQueuedRequests(Transport tran
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
if (org.eclipse.jetty.server.Request.getPathInContext(request).startsWith("/one"))
serverLatch.await();
@@ -559,7 +559,7 @@ public TimeoutHandler(long timeout)
}
@Override
- public boolean process(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
TimeUnit.MILLISECONDS.sleep(timeout);
Content.copy(request, response, callback);
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientTransportDynamicTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientTransportDynamicTest.java
index 3cd2ee9fd626..9494914d5d0f 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientTransportDynamicTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientTransportDynamicTest.java
@@ -396,7 +396,7 @@ public void testDestinationClientConnectionFactoryWrapped() throws Exception
startServer(this::proxyH1H2C, new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.getHeaders().put(HttpHeader.CONTENT_TYPE, MimeTypes.Type.TEXT_PLAIN.asString());
Content.Sink.write(response, true, String.valueOf(Request.getRemotePort(request)), callback);
@@ -492,7 +492,7 @@ public void testHTTP11UpgradeToH2C() throws Exception
startServer(this::h1H2C, new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.getHeaders().put(HttpHeader.CONTENT_TYPE, MimeTypes.Type.TEXT_PLAIN_UTF_8.asString());
Content.Sink.write(response, true, content, callback);
@@ -568,7 +568,7 @@ public void testHTTP11UpgradeToH2CWithForwardProxy() throws Exception
startServer(this::h1H2C, new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.getHeaders().put(HttpHeader.CONTENT_TYPE, MimeTypes.Type.TEXT_PLAIN_UTF_8.asString());
Content.Sink.write(response, true, content, callback);
@@ -608,7 +608,7 @@ public void testHTTP11UpgradeToH2COverTLS() throws Exception
startServer(this::sslH1H2C, new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
response.getHeaders().put(HttpHeader.CONTENT_TYPE, MimeTypes.Type.TEXT_PLAIN_UTF_8.asString());
Content.Sink.write(response, true, content, callback);
@@ -642,7 +642,7 @@ public void testHTTP11UpgradeToH2CWithRequestContentDoesNotUpgrade() throws Exce
startServer(this::h1H2C, new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
Content.copy(request, response, callback);
return true;
@@ -710,7 +710,7 @@ public void testHTTP11UpgradeToH2CFailedServerClose() throws Exception
startServer(this::h1H2C, new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
request.getConnectionMetaData().getConnection().getEndPoint().close();
callback.succeeded();
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpInterimResponseTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpInterimResponseTest.java
index f7864ae6ad7e..73f868d10b0f 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpInterimResponseTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/HttpInterimResponseTest.java
@@ -43,7 +43,7 @@ public void testImplicit100Continue(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
// Reading the request content immediately
// issues an implicit 100 Continue response.
@@ -68,7 +68,7 @@ public void testMultipleDifferentInterimResponses(Transport transport) throws Ex
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
CompletableFuture completable = response.writeInterim(HttpStatus.CONTINUE_100, HttpFields.EMPTY)
.thenCompose(ignored -> Callback.Completable.with(c -> Content.Source.consumeAll(request, c)))
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/RoundRobinConnectionPoolTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/RoundRobinConnectionPoolTest.java
index 620c5ecff218..7447f21276a9 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/RoundRobinConnectionPoolTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/RoundRobinConnectionPoolTest.java
@@ -55,7 +55,7 @@ public void testRoundRobin(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
if (record.get())
remotePorts.add(Request.getRemotePort(request));
@@ -124,7 +124,7 @@ public void testMultiplex(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
try
{
@@ -217,7 +217,7 @@ public void testMultiplexWithMaxUsage(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
remotePorts.add(Request.getRemotePort(request));
callback.succeeded();
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/TrailersTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/TrailersTest.java
index fc36e09b1f24..d8490343140e 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/TrailersTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/TrailersTest.java
@@ -43,7 +43,7 @@ public void testTrailers(Transport transport) throws Exception
start(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
// Read slowly.
try (InputStream input = Content.Source.asInputStream(request))
diff --git a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/VirtualThreadsTest.java b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/VirtualThreadsTest.java
index aef9e0ebdca8..a7045014d126 100644
--- a/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/VirtualThreadsTest.java
+++ b/jetty-core/jetty-tests/jetty-test-client-transports/src/test/java/org/eclipse/jetty/test/client/transport/VirtualThreadsTest.java
@@ -49,7 +49,7 @@ public void testHandlerInvokedOnVirtualThread(Transport transport) throws Except
prepareServer(transport, new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
if (!VirtualThreads.isVirtualThread())
response.setStatus(HttpStatus.NOT_IMPLEMENTED_501);
diff --git a/jetty-core/jetty-unixdomain-server/src/test/java/org/eclipse/jetty/unixdomain/server/UnixDomainTest.java b/jetty-core/jetty-unixdomain-server/src/test/java/org/eclipse/jetty/unixdomain/server/UnixDomainTest.java
index 54523d1c7613..a4fd8b4bfb96 100644
--- a/jetty-core/jetty-unixdomain-server/src/test/java/org/eclipse/jetty/unixdomain/server/UnixDomainTest.java
+++ b/jetty-core/jetty-unixdomain-server/src/test/java/org/eclipse/jetty/unixdomain/server/UnixDomainTest.java
@@ -111,7 +111,7 @@ public void testHTTPOverUnixDomain() throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
// Verify the URI is preserved.
assertEquals(uri, request.getHttpURI().asString());
@@ -162,7 +162,7 @@ public void testHTTPOverUnixDomainWithHTTPProxy() throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
// Proxied requests must have an absolute URI.
HttpURI uri = request.getHttpURI();
@@ -201,7 +201,7 @@ public void testHTTPOverUnixDomainWithProxyProtocol() throws Exception
start(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
EndPoint endPoint = request.getConnectionMetaData().getConnection().getEndPoint();
assertThat(endPoint, Matchers.instanceOf(ProxyConnectionFactory.ProxyEndPoint.class));
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/WebSocketUpgradeHandler.java b/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/WebSocketUpgradeHandler.java
index d22bd74e6054..79f83053ac07 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/WebSocketUpgradeHandler.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-server/src/main/java/org/eclipse/jetty/websocket/core/server/WebSocketUpgradeHandler.java
@@ -39,7 +39,7 @@ public WebSocketUpgradeHandler(WebSocketComponents components)
setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
Response.writeError(request, response, callback, HttpStatus.NOT_FOUND_404);
return true;
@@ -63,7 +63,7 @@ public Configuration getConfiguration()
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
String target = Request.getPathInContext(request);
WebSocketNegotiator negotiator = mappings.getMatchedNegotiator(target, pathSpec ->
@@ -75,7 +75,7 @@ public boolean process(Request request, Response response, Callback callback) th
if (negotiator == null)
{
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
try
@@ -83,7 +83,7 @@ public boolean process(Request request, Response response, Callback callback) th
if (mappings.upgrade(negotiator, request, response, callback, customizer))
return true;
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
catch (Throwable t)
{
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/chat/ChatWebSocketServer.java b/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/chat/ChatWebSocketServer.java
index 19ce0285909c..4d24e718a12b 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/chat/ChatWebSocketServer.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/chat/ChatWebSocketServer.java
@@ -121,7 +121,7 @@ public static void main(String[] args) throws Exception
upgradeHandler.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
response.getHeaders().put(HttpHeader.CONTENT_TYPE, "text/plain");
diff --git a/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/proxy/WebSocketProxyTest.java b/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/proxy/WebSocketProxyTest.java
index 5dc6bb119e49..385d844e2426 100644
--- a/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/proxy/WebSocketProxyTest.java
+++ b/jetty-core/jetty-websocket/jetty-websocket-core-tests/src/test/java/org/eclipse/jetty/websocket/core/proxy/WebSocketProxyTest.java
@@ -79,7 +79,7 @@ public void blockServerUpgradeRequests()
public boolean blockServerUpgradeRequests = false;
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
if (request.getHeaders().get("Upgrade") != null)
{
diff --git a/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-embedded/src/main/java/org/eclipse/jetty/ee10/demos/HelloHandler.java b/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-embedded/src/main/java/org/eclipse/jetty/ee10/demos/HelloHandler.java
index da7c385ff8ae..cd5591ce433c 100644
--- a/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-embedded/src/main/java/org/eclipse/jetty/ee10/demos/HelloHandler.java
+++ b/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-embedded/src/main/java/org/eclipse/jetty/ee10/demos/HelloHandler.java
@@ -43,7 +43,7 @@ public HelloHandler(String greeting, String body)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.getHeaders().put(HttpHeader.CONTENT_TYPE, "text/html; charset=utf-8");
response.setStatus(HttpServletResponse.SC_OK);
diff --git a/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-embedded/src/main/java/org/eclipse/jetty/ee10/demos/HelloWorld.java b/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-embedded/src/main/java/org/eclipse/jetty/ee10/demos/HelloWorld.java
index b078cdd62040..c57b1a8cbd2e 100644
--- a/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-embedded/src/main/java/org/eclipse/jetty/ee10/demos/HelloWorld.java
+++ b/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-embedded/src/main/java/org/eclipse/jetty/ee10/demos/HelloWorld.java
@@ -25,7 +25,7 @@
public class HelloWorld extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
// Declare response encoding and types
diff --git a/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-embedded/src/main/java/org/eclipse/jetty/ee10/demos/ManyHandlers.java b/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-embedded/src/main/java/org/eclipse/jetty/ee10/demos/ManyHandlers.java
index 8895a6db7645..db117f3183a8 100644
--- a/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-embedded/src/main/java/org/eclipse/jetty/ee10/demos/ManyHandlers.java
+++ b/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-embedded/src/main/java/org/eclipse/jetty/ee10/demos/ManyHandlers.java
@@ -70,7 +70,7 @@ public class ManyHandlers
public static class ParamHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
Fields queryFields = Request.extractQueryParameters(request);
Fields formFields = FormFields.from(request).get();
@@ -90,10 +90,10 @@ public boolean process(Request request, Response response, Callback callback) th
public static class WelcomeWrapHandler extends Handler.Wrapper
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.getHeaders().add("X-Welcome", "Greetings from WelcomeWrapHandler");
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
}
diff --git a/jetty-ee10/jetty-ee10-examples/src/test/java/org/eclipse/jetty/examples/Jetty12Example.java b/jetty-ee10/jetty-ee10-examples/src/test/java/org/eclipse/jetty/examples/Jetty12Example.java
index 114c22f648ee..f7d4ced1a1d7 100644
--- a/jetty-ee10/jetty-ee10-examples/src/test/java/org/eclipse/jetty/examples/Jetty12Example.java
+++ b/jetty-ee10/jetty-ee10-examples/src/test/java/org/eclipse/jetty/examples/Jetty12Example.java
@@ -42,7 +42,7 @@ public static void main(String[] args) throws Exception
embedded.setHandler(new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request,
+ public boolean handle(org.eclipse.jetty.server.Request request,
org.eclipse.jetty.server.Response response,
Callback callback) throws Exception
{
diff --git a/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ClientAuthProxyTest.java b/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ClientAuthProxyTest.java
index 8d017ed8570e..d7ce1b9a9501 100644
--- a/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ClientAuthProxyTest.java
+++ b/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ClientAuthProxyTest.java
@@ -137,7 +137,7 @@ private void startServer() throws Exception
startServer(new Handler.Abstract()
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request, Response response, Callback callback)
+ public boolean handle(org.eclipse.jetty.server.Request request, Response response, Callback callback)
{
X509Certificate[] certificates = (X509Certificate[])request.getAttribute(SecureRequestCustomizer.PEER_CERTIFICATES_ATTRIBUTE);
Assertions.assertNotNull(certificates);
diff --git a/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ConnectHandlerSSLTest.java b/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ConnectHandlerSSLTest.java
index f6be69c3b1a3..1dd6c8af83f2 100644
--- a/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ConnectHandlerSSLTest.java
+++ b/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ConnectHandlerSSLTest.java
@@ -153,7 +153,7 @@ private SSLSocket wrapSocket(Socket socket) throws Exception
private static class ServerHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
String uri = Request.getPathInContext(request);
if ("/echo".equals(uri))
diff --git a/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ConnectHandlerTest.java b/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ConnectHandlerTest.java
index 3561923a09cf..12cad5e7d55e 100644
--- a/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ConnectHandlerTest.java
+++ b/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ConnectHandlerTest.java
@@ -895,7 +895,7 @@ public void testCONNECTAndGETAndOutputShutdown() throws Exception
private static class ServerHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
String cp = Request.getPathInContext(request);
switch (cp)
diff --git a/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/EmptyServerHandler.java b/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/EmptyServerHandler.java
index 996ec43a4922..09976ae9f7e0 100644
--- a/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/EmptyServerHandler.java
+++ b/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/EmptyServerHandler.java
@@ -21,7 +21,7 @@
public class EmptyServerHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
callback.succeeded();
return true;
diff --git a/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ForwardProxyServerTest.java b/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ForwardProxyServerTest.java
index 5cbfba9850a3..8d571349bf44 100644
--- a/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ForwardProxyServerTest.java
+++ b/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ForwardProxyServerTest.java
@@ -236,7 +236,7 @@ public void testIPv6WithXForwardedForHeader(String ipv6) throws Exception
startServer(null, http, new Handler.Abstract()
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
String remoteHost = org.eclipse.jetty.server.Request.getRemoteAddr(request);
assertThat(remoteHost, Matchers.matchesPattern("\\[.+\\]"));
@@ -275,7 +275,7 @@ public void testIPv6WithForwardedHeader() throws Exception
startServer(null, http, new Handler.Abstract()
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
String remoteHost = org.eclipse.jetty.server.Request.getRemoteAddr(request);
assertThat(remoteHost, Matchers.matchesPattern("\\[.+\\]"));
diff --git a/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ForwardProxyTLSServerTest.java b/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ForwardProxyTLSServerTest.java
index 801a4628c372..20784115bd8e 100644
--- a/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ForwardProxyTLSServerTest.java
+++ b/jetty-ee10/jetty-ee10-proxy/src/test/java/org/eclipse/jetty/ee10/proxy/ForwardProxyTLSServerTest.java
@@ -514,7 +514,7 @@ public void testProxyAuthentication(SslContextFactory.Server proxyTLS) throws Ex
testProxyAuthentication(proxyTLS, new ConnectHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
String proxyAuth = request.getHeaders().get(HttpHeader.PROXY_AUTHORIZATION);
if (proxyAuth == null)
@@ -524,7 +524,7 @@ public boolean process(Request request, Response response, Callback callback) th
callback.succeeded();
return true;
}
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
}, realm);
}
@@ -537,7 +537,7 @@ public void testProxyAuthenticationWithResponseContent(SslContextFactory.Server
testProxyAuthentication(proxyTLS, new ConnectHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
String proxyAuth = request.getHeaders().get(HttpHeader.PROXY_AUTHORIZATION);
if (proxyAuth == null)
@@ -547,7 +547,7 @@ public boolean process(Request request, Response response, Callback callback) th
response.write(true, ByteBuffer.allocate(4096), callback);
return true;
}
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
}, realm);
}
@@ -560,7 +560,7 @@ public void testProxyAuthenticationWithIncludedAddressWithResponseContent(SslCon
testProxyAuthentication(proxyTLS, new ConnectHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
String proxyAuth = request.getHeaders().get(HttpHeader.PROXY_AUTHORIZATION);
if (proxyAuth == null)
@@ -570,7 +570,7 @@ public boolean process(Request request, Response response, Callback callback) th
response.write(true, ByteBuffer.allocate(1024), callback);
return true;
}
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
}, realm, true);
}
@@ -834,10 +834,10 @@ public void testServerLongProcessing(SslContextFactory.Server proxyTLS) throws E
startTLSServer(new EmptyServerHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
sleep(3 * timeout);
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
});
startProxy(proxyTLS);
@@ -870,10 +870,10 @@ public void testServerLongProcessingWithRequestIdleTimeout(SslContextFactory.Ser
startTLSServer(new EmptyServerHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
sleep(3 * timeout);
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
});
startProxy(proxyTLS);
@@ -998,7 +998,7 @@ private static void sleep(long ms)
private static class ServerHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
String uri = Request.getPathInContext(request);
if ("/echo".equals(uri))
diff --git a/jetty-ee10/jetty-ee10-quickstart/src/main/java/org/eclipse/jetty/ee10/quickstart/QuickStartGeneratorConfiguration.java b/jetty-ee10/jetty-ee10-quickstart/src/main/java/org/eclipse/jetty/ee10/quickstart/QuickStartGeneratorConfiguration.java
index e68edaa87f88..5b5b2ece34e8 100644
--- a/jetty-ee10/jetty-ee10-quickstart/src/main/java/org/eclipse/jetty/ee10/quickstart/QuickStartGeneratorConfiguration.java
+++ b/jetty-ee10/jetty-ee10-quickstart/src/main/java/org/eclipse/jetty/ee10/quickstart/QuickStartGeneratorConfiguration.java
@@ -466,7 +466,7 @@ public void generateQuickStartWebXml(WebAppContext context, OutputStream stream)
}
//error-pages
- Map errorPages = ((ErrorPageErrorHandler)context.getErrorProcessor()).getErrorPages();
+ Map errorPages = ((ErrorPageErrorHandler)context.getErrorHandler()).getErrorPages();
if (errorPages != null)
{
for (Map.Entry entry : errorPages.entrySet())
diff --git a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/DefaultServlet.java b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/DefaultServlet.java
index b14393ce8d06..14baca5d74de 100644
--- a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/DefaultServlet.java
+++ b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/DefaultServlet.java
@@ -953,7 +953,7 @@ public String getWelcomeTarget(Request coreRequest) throws IOException
}
@Override
- protected void welcomeActionProcess(Request coreRequest, Response coreResponse, Callback callback, WelcomeAction welcomeAction) throws IOException
+ protected void handleWelcomeAction(Request coreRequest, Response coreResponse, Callback callback, WelcomeAction welcomeAction) throws IOException
{
HttpServletRequest request = getServletRequest(coreRequest);
HttpServletResponse response = getServletResponse(coreResponse);
diff --git a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ErrorHandler.java b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ErrorHandler.java
index fc9c5c448a8e..af82e37aa9b1 100644
--- a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ErrorHandler.java
+++ b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ErrorHandler.java
@@ -48,7 +48,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class ErrorHandler implements Request.Processor
+public class ErrorHandler implements Request.Handler
{
// TODO This classes API needs to be majorly refactored/cleanup in jetty-10
private static final Logger LOG = LoggerFactory.getLogger(ErrorHandler.class);
@@ -80,7 +80,7 @@ public boolean errorPageForMethod(String method)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if (!errorPageForMethod(request.getMethod()))
{
@@ -604,13 +604,13 @@ public interface ErrorPageMapper
String getErrorPage(HttpServletRequest request);
}
- public static Request.Processor getErrorProcessor(Server server, ContextHandler context)
+ public static Request.Handler getErrorHandler(Server server, ContextHandler context)
{
- Request.Processor errorProcessor = null;
+ Request.Handler errorHandler = null;
if (context != null)
- errorProcessor = context.getErrorProcessor();
- if (errorProcessor == null && server != null)
- errorProcessor = server.getErrorProcessor();
- return errorProcessor;
+ errorHandler = context.getErrorHandler();
+ if (errorHandler == null && server != null)
+ errorHandler = server.getErrorHandler();
+ return errorHandler;
}
}
diff --git a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletChannel.java b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletChannel.java
index 9659cc9256b5..19af0095d246 100644
--- a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletChannel.java
+++ b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletChannel.java
@@ -493,10 +493,10 @@ public boolean handle()
Response.ensureNotPersistent(_servletContextRequest, _servletContextRequest.getResponse());
ContextHandler.ScopedContext context = (ContextHandler.ScopedContext)_servletContextRequest.getAttribute(ErrorHandler.ERROR_CONTEXT);
- Request.Processor errorProcessor = ErrorHandler.getErrorProcessor(getServer(), context == null ? null : context.getContextHandler());
+ Request.Handler errorHandler = ErrorHandler.getErrorHandler(getServer(), context == null ? null : context.getContextHandler());
- // If we can't have a body or have no processor, then create a minimal error response.
- if (HttpStatus.hasNoBody(getResponse().getStatus()) || errorProcessor == null)
+ // If we can't have a body or have no ErrorHandler, then create a minimal error response.
+ if (HttpStatus.hasNoBody(getResponse().getStatus()) || errorHandler == null)
{
sendResponseAndComplete();
}
@@ -507,7 +507,7 @@ public boolean handle()
// _state.completing();
try (Blocker.Callback blocker = Blocker.callback())
{
- dispatch(() -> errorProcessor.process(_servletContextRequest, getResponse(), blocker));
+ dispatch(() -> errorHandler.handle(_servletContextRequest, getResponse(), blocker));
blocker.block();
}
}
diff --git a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletContextHandler.java b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletContextHandler.java
index 9856ffeca2a5..951ca22e1e21 100644
--- a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletContextHandler.java
+++ b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletContextHandler.java
@@ -1192,7 +1192,7 @@ protected ContextResponse wrapResponse(ContextRequest request, Response response
}
@Override
- protected boolean processByContextHandler(String pathInContext, ContextRequest request, Response response, Callback callback)
+ protected boolean handleByContextHandler(String pathInContext, ContextRequest request, Response response, Callback callback)
{
ServletContextRequest scopedRequest = Request.as(request, ServletContextRequest.class);
DispatcherType dispatch = scopedRequest.getHttpServletRequest().getDispatcherType();
@@ -1202,7 +1202,7 @@ protected boolean processByContextHandler(String pathInContext, ContextRequest r
return true;
}
- return super.processByContextHandler(pathInContext, request, response, callback);
+ return super.handleByContextHandler(pathInContext, request, response, callback);
}
@Override
diff --git a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletHandler.java b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletHandler.java
index 3024aadfe386..0dc96df0172d 100644
--- a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletHandler.java
+++ b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletHandler.java
@@ -434,7 +434,7 @@ protected IdentityService getIdentityService()
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
// We will always have a ServletScopedRequest and MappedServlet otherwise we will not reach ServletHandler.
ServletContextRequest servletContextRequest = Request.as(request, ServletContextRequest.class);
diff --git a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletRequestState.java b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletRequestState.java
index d904f72c1240..3e28f0437ee7 100644
--- a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletRequestState.java
+++ b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletRequestState.java
@@ -26,7 +26,7 @@
import org.eclipse.jetty.io.QuietException;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Response;
-import org.eclipse.jetty.server.handler.ErrorProcessor;
+import org.eclipse.jetty.server.handler.ErrorHandler;
import org.eclipse.jetty.util.thread.AutoLock;
import org.eclipse.jetty.util.thread.Scheduler;
import org.slf4j.Logger;
@@ -851,7 +851,7 @@ else if (cause instanceof UnavailableException)
request.setAttribute(ERROR_EXCEPTION_TYPE, th.getClass());
// Set Jetty specific attributes.
- request.setAttribute(ErrorProcessor.ERROR_EXCEPTION, th);
+ request.setAttribute(ErrorHandler.ERROR_EXCEPTION, th);
// Ensure any async lifecycle is ended!
_requestState = RequestState.BLOCKING;
@@ -895,16 +895,16 @@ public void sendError(int code, String message)
response.setStatus(code);
servletContextRequest.errorClose();
- request.setAttribute(ErrorHandler.ERROR_CONTEXT, servletContextRequest.getErrorContext());
+ request.setAttribute(org.eclipse.jetty.ee10.servlet.ErrorHandler.ERROR_CONTEXT, servletContextRequest.getErrorContext());
request.setAttribute(ERROR_REQUEST_URI, httpServletRequest.getRequestURI());
request.setAttribute(ERROR_SERVLET_NAME, servletContextRequest.getServletName());
request.setAttribute(ERROR_STATUS_CODE, code);
request.setAttribute(ERROR_MESSAGE, message);
// Set Jetty Specific Attributes.
- request.setAttribute(ErrorProcessor.ERROR_CONTEXT, servletContextRequest.getContext());
- request.setAttribute(ErrorProcessor.ERROR_MESSAGE, message);
- request.setAttribute(ErrorProcessor.ERROR_STATUS, code);
+ request.setAttribute(ErrorHandler.ERROR_CONTEXT, servletContextRequest.getContext());
+ request.setAttribute(ErrorHandler.ERROR_MESSAGE, message);
+ request.setAttribute(ErrorHandler.ERROR_STATUS, code);
_sendError = true;
if (_event != null)
diff --git a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/SessionHandler.java b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/SessionHandler.java
index c86c0486f7ee..2cbc0f00217e 100644
--- a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/SessionHandler.java
+++ b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/SessionHandler.java
@@ -634,7 +634,7 @@ public void setSessionTrackingModes(Set sessionTrackingMode
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
Handler next = getHandler();
if (next == null)
@@ -655,6 +655,6 @@ public boolean process(Request request, Response response, Callback callback) th
Response.replaceCookie(servletContextResponse, cookie);
}
- return next.process(request, response, callback);
+ return next.handle(request, response, callback);
}
}
diff --git a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/security/IdentityService.java b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/security/IdentityService.java
index 3a3019d9c62b..7230145eb9dd 100644
--- a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/security/IdentityService.java
+++ b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/security/IdentityService.java
@@ -29,7 +29,7 @@ public interface IdentityService
/**
* Associate a user identity with the current thread.
* This is called with as a thread enters the
- * {@link Handler#process(Request, org.eclipse.jetty.server.Response, org.eclipse.jetty.util.Callback)}
+ * {@link Handler#handle(Request, org.eclipse.jetty.server.Response, org.eclipse.jetty.util.Callback)}
* method and then again with a null argument as that call exits.
*
* @param user The current user or null for no user to associated.
diff --git a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/security/SecurityHandler.java b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/security/SecurityHandler.java
index 383d4542dca7..70f36321a616 100644
--- a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/security/SecurityHandler.java
+++ b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/security/SecurityHandler.java
@@ -449,7 +449,7 @@ public void setSessionRenewedOnAuthentication(boolean renew)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
Handler next = getHandler();
if (next == null)
@@ -464,7 +464,7 @@ public boolean process(Request request, Response response, Callback callback) th
if (!checkSecurity(servletApiRequest))
{
//don't need to do any security work, let other handlers do the processing
- return next.process(request, response, callback);
+ return next.handle(request, response, callback);
}
//See Servlet Spec 3.1 sec 13.6.3
@@ -516,7 +516,7 @@ public boolean process(Request request, Response response, Callback callback) th
}
//process the request by other handlers
- boolean processed = next.process(request, response, callback);
+ boolean processed = next.handle(request, response, callback);
// TODO this looks wrong
if (processed && authenticator != null)
authenticator.secureResponse(request, response, callback, isAuthMandatory, userAuth);
@@ -532,7 +532,7 @@ public boolean process(Request request, Response response, Callback callback) th
try
{
//process the request by other handlers
- processed = next.process(request, response, callback);
+ processed = next.handle(request, response, callback);
}
finally
{
@@ -561,7 +561,7 @@ public boolean process(Request request, Response response, Callback callback) th
previousIdentity = _identityService.associate(null);
//process the request by other handlers
- boolean processed = next.process(request, response, callback);
+ boolean processed = next.handle(request, response, callback);
if (processed && authenticator != null)
authenticator.secureResponse(request, response, callback, isAuthMandatory, null);
diff --git a/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/AsyncContextTest.java b/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/AsyncContextTest.java
index d647da239c75..43d27f8600ec 100644
--- a/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/AsyncContextTest.java
+++ b/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/AsyncContextTest.java
@@ -86,7 +86,7 @@ public void setUp() throws Exception
ErrorPageErrorHandler errorHandler = new ErrorPageErrorHandler();
errorHandler.setUnwrapServletException(false);
- _contextHandler.setErrorProcessor(errorHandler);
+ _contextHandler.setErrorHandler(errorHandler);
errorHandler.addErrorPage(500, "/error/500");
errorHandler.addErrorPage(IOException.class.getName(), "/error/IOE");
diff --git a/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/AsyncListenerTest.java b/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/AsyncListenerTest.java
index 24999b1976d7..747ff2cd085e 100644
--- a/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/AsyncListenerTest.java
+++ b/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/AsyncListenerTest.java
@@ -166,7 +166,7 @@ protected void writeErrorPageMessage(HttpServletRequest request, Writer writer,
super.writeErrorPageMessage(request, writer, code, message, uri);
}
};
- server.setErrorProcessor(errorHandler);
+ server.setErrorHandler(errorHandler);
String httpResponse = connector.getResponse(
"GET /ctx/path HTTP/1.1\r\n" +
@@ -320,7 +320,7 @@ protected void writeErrorPageMessage(HttpServletRequest request, Writer writer,
super.writeErrorPageMessage(request, writer, code, message, uri);
}
};
- server.setErrorProcessor(errorHandler);
+ server.setErrorHandler(errorHandler);
String httpResponse = connector.getResponse(
"GET / HTTP/1.1\r\n" +
diff --git a/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/AsyncServletTest.java b/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/AsyncServletTest.java
index e8852dcc89b9..7571f611fb8a 100644
--- a/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/AsyncServletTest.java
+++ b/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/AsyncServletTest.java
@@ -98,7 +98,7 @@ public void setUp() throws Exception
context.addEventListener(new DebugListener());
_errorHandler = new ErrorPageErrorHandler();
- context.setErrorProcessor(_errorHandler);
+ context.setErrorHandler(_errorHandler);
_errorHandler.addErrorPage(300, 599, "/error/custom");
_servletHandler = context.getServletHandler();
diff --git a/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/DispatcherTest.java b/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/DispatcherTest.java
index ac3f665b344d..7792cc3f0aca 100644
--- a/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/DispatcherTest.java
+++ b/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/DispatcherTest.java
@@ -751,7 +751,7 @@ public void testDispatchMapping404() throws Exception
_contextHandler.addServlet(new ServletHolder("DispatchServlet", AsyncDispatchTestServlet.class), "/DispatchServlet");
ErrorPageErrorHandler errorPageErrorHandler = new ErrorPageErrorHandler();
- _contextHandler.setErrorProcessor(errorPageErrorHandler);
+ _contextHandler.setErrorHandler(errorPageErrorHandler);
errorPageErrorHandler.addErrorPage(404, "/TestServlet");
HttpTester.Response response;
diff --git a/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/ErrorPageTest.java b/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/ErrorPageTest.java
index d9375607982d..96065c8f4ed4 100644
--- a/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/ErrorPageTest.java
+++ b/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/ErrorPageTest.java
@@ -106,17 +106,17 @@ public void init() throws Exception
Handler.Singleton noopHandler = new Handler.Wrapper()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if (Request.getPathInContext(request).startsWith("/noop"))
return false;
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
};
_context.insertHandler(noopHandler);
_errorPageErrorHandler = new ErrorPageErrorHandler();
- _context.setErrorProcessor(_errorPageErrorHandler);
+ _context.setErrorHandler(_errorPageErrorHandler);
_errorPageErrorHandler.addErrorPage(595, "/error/595");
_errorPageErrorHandler.addErrorPage(597, "/sync");
_errorPageErrorHandler.addErrorPage(599, "/error/599");
@@ -455,7 +455,7 @@ public void testAsyncErrorPageSCD() throws Exception
@Test
public void testNoop() throws Exception
{
- // The ServletContextHandler does not handle so should go to the servers ErrorProcessor.
+ // The ServletContextHandler does not handle so should go to the servers ErrorHandler.
String response = _connector.getResponse("GET /noop/info HTTP/1.0\r\n\r\n");
assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found"));
assertThat(response, not(Matchers.containsString("DISPATCH: ERROR")));
diff --git a/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/ServletContextHandlerTest.java b/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/ServletContextHandlerTest.java
index 640acbc9da0e..61b34dc6045b 100644
--- a/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/ServletContextHandlerTest.java
+++ b/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/ServletContextHandlerTest.java
@@ -1927,7 +1927,7 @@ public void testFallThrough() throws Exception
list.addHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
Response.writeError(request, response, callback, 404, "Fell Through");
return true;
diff --git a/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/ServletRequestLogTest.java b/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/ServletRequestLogTest.java
index e61d45d1720b..1de2d34258b1 100644
--- a/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/ServletRequestLogTest.java
+++ b/jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/ServletRequestLogTest.java
@@ -467,7 +467,7 @@ public void testLogHandlerCollectionSimpleErrorPageMapping(Servlet testServlet,
// Add error page mapping
ErrorPageErrorHandler errorMapper = new ErrorPageErrorHandler();
errorMapper.addErrorPage(500, "/errorpage");
- app.setErrorProcessor(errorMapper);
+ app.setErrorHandler(errorMapper);
try (StacklessLogging scope = new StacklessLogging(HttpChannel.class))
{
@@ -547,7 +547,7 @@ public void testLogHandlerWrapped(Servlet testServlet, String requestPath, Strin
// Add error page mapping
ErrorPageErrorHandler errorMapper = new ErrorPageErrorHandler();
errorMapper.addErrorPage(500, "/errorpage");
- app.setErrorProcessor(errorMapper);
+ app.setErrorHandler(errorMapper);
try
{
diff --git a/jetty-ee10/jetty-ee10-servlets/src/test/java/org/eclipse/jetty/ee10/servlets/ThreadStarvationTest.java b/jetty-ee10/jetty-ee10-servlets/src/test/java/org/eclipse/jetty/ee10/servlets/ThreadStarvationTest.java
index 78bc366f2c8a..837f57b0ff7a 100644
--- a/jetty-ee10/jetty-ee10-servlets/src/test/java/org/eclipse/jetty/ee10/servlets/ThreadStarvationTest.java
+++ b/jetty-ee10/jetty-ee10-servlets/src/test/java/org/eclipse/jetty/ee10/servlets/ThreadStarvationTest.java
@@ -259,10 +259,10 @@ public boolean flush(ByteBuffer... buffers) throws IOException
_server.addConnector(connector);
final AtomicInteger count = new AtomicInteger(0);
- class TheHandler extends Handler.Processor
+ class TheHandler extends Handler.Abstract
{
@Override
- public void process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(request request, Response response, Callback callback) throws Exception
{
int c = count.getAndIncrement();
try
@@ -280,6 +280,7 @@ public void process(Request request, Response response, Callback callback) throw
response.setStatus(200);
response.setContentLength(13);
response.write(true, callback, "Hello World!\n");
+ return true;
}
}
diff --git a/jetty-ee10/jetty-ee10-tests/jetty-ee10-test-integration/src/test/java/org/eclipse/jetty/ee10/test/rfcs/RFC2616BaseTest.java b/jetty-ee10/jetty-ee10-tests/jetty-ee10-test-integration/src/test/java/org/eclipse/jetty/ee10/test/rfcs/RFC2616BaseTest.java
index 66ea47e0e923..2d8210bcbae5 100644
--- a/jetty-ee10/jetty-ee10-tests/jetty-ee10-test-integration/src/test/java/org/eclipse/jetty/ee10/test/rfcs/RFC2616BaseTest.java
+++ b/jetty-ee10/jetty-ee10-tests/jetty-ee10-test-integration/src/test/java/org/eclipse/jetty/ee10/test/rfcs/RFC2616BaseTest.java
@@ -64,7 +64,7 @@ public abstract class RFC2616BaseTest
public static class EchoHandler extends Handler.Abstract.NonBlocking
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
String contentType = request.getHeaders().get(HttpHeader.CONTENT_TYPE);
diff --git a/jetty-ee10/jetty-ee10-webapp/src/main/java/org/eclipse/jetty/ee10/webapp/StandardDescriptorProcessor.java b/jetty-ee10/jetty-ee10-webapp/src/main/java/org/eclipse/jetty/ee10/webapp/StandardDescriptorProcessor.java
index c62fb5007b4c..0a883c1910cf 100644
--- a/jetty-ee10/jetty-ee10-webapp/src/main/java/org/eclipse/jetty/ee10/webapp/StandardDescriptorProcessor.java
+++ b/jetty-ee10/jetty-ee10-webapp/src/main/java/org/eclipse/jetty/ee10/webapp/StandardDescriptorProcessor.java
@@ -964,8 +964,8 @@ public void visitErrorPage(WebAppContext context, Descriptor descriptor, XmlPars
String location = node.getString("location", false, true);
if (!location.startsWith("/"))
throw new IllegalStateException("Missing leading '/' for location: " + location);
- //TODO is the ErrorProcessor always going to be an ErrorPageErrorHandler?
- ErrorPageErrorHandler handler = (ErrorPageErrorHandler)context.getErrorProcessor();
+ //TODO is the ErrorHandler always going to be an ErrorPageErrorHandler?
+ ErrorPageErrorHandler handler = (ErrorPageErrorHandler)context.getErrorHandler();
String originName = "error." + error;
Origin origin = context.getMetaData().getOrigin(originName);
switch (origin)
diff --git a/jetty-ee10/jetty-ee10-webapp/src/main/java/org/eclipse/jetty/ee10/webapp/WebAppContext.java b/jetty-ee10/jetty-ee10-webapp/src/main/java/org/eclipse/jetty/ee10/webapp/WebAppContext.java
index 1bc140efbff1..975ac1047728 100644
--- a/jetty-ee10/jetty-ee10-webapp/src/main/java/org/eclipse/jetty/ee10/webapp/WebAppContext.java
+++ b/jetty-ee10/jetty-ee10-webapp/src/main/java/org/eclipse/jetty/ee10/webapp/WebAppContext.java
@@ -221,7 +221,7 @@ public WebAppContext(Container parent, String contextPath, SessionHandler sessio
// always pass parent as null and then set below, so that any resulting setServer call
// is done after this instance is constructed.
super(null, contextPath, sessionHandler, securityHandler, servletHandler, errorHandler, options);
- setErrorProcessor(errorHandler != null ? errorHandler : new ErrorPageErrorHandler());
+ setErrorHandler(errorHandler != null ? errorHandler : new ErrorPageErrorHandler());
setProtectedTargets(__dftProtectedTargets);
Handler.Container.setAsParent(parent, this);
}
diff --git a/jetty-ee10/jetty-ee10-webapp/src/main/java/org/eclipse/jetty/ee10/webapp/WebXmlConfiguration.java b/jetty-ee10/jetty-ee10-webapp/src/main/java/org/eclipse/jetty/ee10/webapp/WebXmlConfiguration.java
index b1554c01e883..5a08445634ee 100644
--- a/jetty-ee10/jetty-ee10-webapp/src/main/java/org/eclipse/jetty/ee10/webapp/WebXmlConfiguration.java
+++ b/jetty-ee10/jetty-ee10-webapp/src/main/java/org/eclipse/jetty/ee10/webapp/WebXmlConfiguration.java
@@ -130,8 +130,8 @@ public void deconfigure(WebAppContext context) throws Exception
{
context.setWelcomeFiles(null);
- //TODO: ErrorPageErrorHandler is not an ErrorProcessor
- if (context.getErrorProcessor() instanceof ErrorPageErrorHandler errorPageErrorHandler)
+ //TODO: ErrorPageErrorHandler is not an ErrorHandler
+ if (context.getErrorHandler() instanceof ErrorPageErrorHandler errorPageErrorHandler)
errorPageErrorHandler.setErrorPages(null);
IO.close(_resourceFactory);
diff --git a/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-embedded/src/main/java/org/eclipse/jetty/ee9/demos/FastFileServer.java b/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-embedded/src/main/java/org/eclipse/jetty/ee9/demos/FastFileServer.java
index 336110ea11c2..7797482b323b 100644
--- a/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-embedded/src/main/java/org/eclipse/jetty/ee9/demos/FastFileServer.java
+++ b/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-embedded/src/main/java/org/eclipse/jetty/ee9/demos/FastFileServer.java
@@ -77,7 +77,7 @@ private FastFileHandler(File dir)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
return false;
// TODO
diff --git a/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-embedded/src/main/java/org/eclipse/jetty/ee9/demos/HelloHandler.java b/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-embedded/src/main/java/org/eclipse/jetty/ee9/demos/HelloHandler.java
index bcd74023747c..ffbffb92afe5 100644
--- a/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-embedded/src/main/java/org/eclipse/jetty/ee9/demos/HelloHandler.java
+++ b/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-embedded/src/main/java/org/eclipse/jetty/ee9/demos/HelloHandler.java
@@ -43,7 +43,7 @@ public HelloHandler(String greeting, String body)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.getHeaders().add(HttpHeader.CONTENT_TYPE, "text/html; charset=utf-8");
response.setStatus(HttpServletResponse.SC_OK);
diff --git a/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-embedded/src/main/java/org/eclipse/jetty/ee9/demos/HelloWorld.java b/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-embedded/src/main/java/org/eclipse/jetty/ee9/demos/HelloWorld.java
index 5ce577464f5b..6e6d761ee404 100644
--- a/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-embedded/src/main/java/org/eclipse/jetty/ee9/demos/HelloWorld.java
+++ b/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-embedded/src/main/java/org/eclipse/jetty/ee9/demos/HelloWorld.java
@@ -25,7 +25,7 @@
public class HelloWorld extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.getHeaders().add(HttpHeader.CONTENT_TYPE, "text/html; charset=utf-8");
response.setStatus(HttpServletResponse.SC_OK);
diff --git a/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-embedded/src/main/java/org/eclipse/jetty/ee9/demos/ManyHandlers.java b/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-embedded/src/main/java/org/eclipse/jetty/ee9/demos/ManyHandlers.java
index a0133256543f..5acaee386140 100644
--- a/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-embedded/src/main/java/org/eclipse/jetty/ee9/demos/ManyHandlers.java
+++ b/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-embedded/src/main/java/org/eclipse/jetty/ee9/demos/ManyHandlers.java
@@ -66,7 +66,7 @@ public class ManyHandlers
public static class ParamHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.getHeaders().add(HttpHeader.CONTENT_TYPE, "text/plain");
response.setStatus(HttpServletResponse.SC_OK);
@@ -81,13 +81,13 @@ public boolean process(Request request, Response response, Callback callback) th
public static class WelcomeWrapHandler extends Handler.Wrapper
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
Handler next = getHandler();
if (next == null)
return false;
response.getHeaders().add(HttpHeader.CONTENT_TYPE, "text/plain");
- return next.process(request, response, callback);
+ return next.handle(request, response, callback);
}
}
diff --git a/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/ContextHandler.java b/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/ContextHandler.java
index 8142501892c4..1bc24b8143d6 100644
--- a/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/ContextHandler.java
+++ b/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/ContextHandler.java
@@ -2439,7 +2439,7 @@ public Session getSession(boolean create)
}
}
- public class CoreContextHandler extends org.eclipse.jetty.server.handler.ContextHandler implements org.eclipse.jetty.server.Request.Processor
+ public class CoreContextHandler extends org.eclipse.jetty.server.handler.ContextHandler implements org.eclipse.jetty.server.Request.Handler
{
CoreContextHandler()
{
@@ -2585,7 +2585,7 @@ public APIContext getAPIContext()
private class CoreToNestedHandler extends Abstract
{
@Override
- public boolean process(org.eclipse.jetty.server.Request coreRequest, Response response, Callback callback) throws Exception
+ public boolean handle(org.eclipse.jetty.server.Request coreRequest, Response response, Callback callback) throws Exception
{
HttpChannel httpChannel = org.eclipse.jetty.server.Request.get(coreRequest, CoreContextRequest.class, CoreContextRequest::getHttpChannel);
httpChannel.onProcess(response, callback);
diff --git a/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/AbstractHttpTest.java b/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/AbstractHttpTest.java
index 47d7d4b0c5fa..20dd4f28be93 100644
--- a/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/AbstractHttpTest.java
+++ b/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/AbstractHttpTest.java
@@ -113,7 +113,7 @@ protected ThrowExceptionOnDemandHandler(boolean throwException)
}
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
if (throwException)
throw new TestCommitException();
diff --git a/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/AsyncCompletionTest.java b/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/AsyncCompletionTest.java
index 99282d80a34f..d4e6a1d2f755 100644
--- a/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/AsyncCompletionTest.java
+++ b/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/AsyncCompletionTest.java
@@ -117,7 +117,7 @@ protected void startServer(Handler handler) throws Exception
org.eclipse.jetty.server.Handler.Singleton terminateHandler = new org.eclipse.jetty.server.Handler.Wrapper()
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request, Response response, Callback callback) throws Exception
+ public boolean handle(org.eclipse.jetty.server.Request request, Response response, Callback callback) throws Exception
{
request.addHttpStreamWrapper(s -> new HttpStream.Wrapper(s)
{
@@ -135,7 +135,7 @@ public void failed(Throwable x)
super.failed(x);
}
});
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
};
_server.insertHandler(terminateHandler);
diff --git a/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/ContextHandlerTest.java b/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/ContextHandlerTest.java
index 4b8a6963983f..3dcbffbed757 100644
--- a/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/ContextHandlerTest.java
+++ b/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/ContextHandlerTest.java
@@ -754,7 +754,7 @@ public void exitScope(ContextHandler.APIContext context, Request request)
assertThat(response.getContent(), containsString("Hello"));
assertThat(history, contains(
- // Enter for process(request, response, callback)
+ // Enter for handle(request, response, callback)
"Core enter http://0.0.0.0/",
"EE9 enter /",
"Handling",
diff --git a/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/HttpServerTestFixture.java b/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/HttpServerTestFixture.java
index 9b7a54cc0490..deee40a66af3 100644
--- a/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/HttpServerTestFixture.java
+++ b/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/HttpServerTestFixture.java
@@ -90,7 +90,7 @@ protected void startServer(org.eclipse.jetty.ee9.nested.Handler handler) throws
protected static class OptionsHandler extends Handler.Abstract
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
if (request.getMethod().equals("OPTIONS"))
response.setStatus(200);
@@ -105,7 +105,7 @@ public boolean process(org.eclipse.jetty.server.Request request, org.eclipse.jet
protected static class HelloWorldHandler extends Handler.Abstract
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
response.setStatus(200);
Content.Sink.write(response, true, "Hello world\r\n", callback);
@@ -125,7 +125,7 @@ public SendErrorHandler(int code, String message)
}
@Override
- public boolean process(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
org.eclipse.jetty.server.Response.writeError(request, response, callback, code, message);
return true;
@@ -147,7 +147,7 @@ public ReadExactHandler(int expected)
}
@Override
- public boolean process(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
long len = expected < 0 ? request.getLength() : expected;
if (len < 0)
@@ -188,7 +188,7 @@ public boolean process(org.eclipse.jetty.server.Request request, org.eclipse.jet
protected static class ReadHandler extends Handler.Abstract
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
response.setStatus(200);
Content.Source.asString(request, StandardCharsets.UTF_8, Promise.from(
@@ -202,7 +202,7 @@ public boolean process(org.eclipse.jetty.server.Request request, org.eclipse.jet
protected static class DataHandler extends Handler.Abstract
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request, Response response, Callback callback) throws Exception
+ public boolean handle(org.eclipse.jetty.server.Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
diff --git a/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/RequestTest.java b/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/RequestTest.java
index 58e549d3e6fc..2a719809f090 100644
--- a/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/RequestTest.java
+++ b/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/RequestTest.java
@@ -1014,7 +1014,7 @@ public void testIPv6() throws Exception
org.eclipse.jetty.server.Handler.Singleton handler = new org.eclipse.jetty.server.Handler.Wrapper()
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
+ public boolean handle(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback) throws Exception
{
ConnectionMetaData connectionMetaData = new ConnectionMetaData.Wrapper(request.getConnectionMetaData())
{
@@ -1034,7 +1034,7 @@ public ConnectionMetaData getConnectionMetaData()
}
};
- return super.process(wrapper, response, callback);
+ return super.handle(wrapper, response, callback);
}
};
diff --git a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ClientAuthProxyTest.java b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ClientAuthProxyTest.java
index 0297458347ac..7a9d2dee5451 100644
--- a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ClientAuthProxyTest.java
+++ b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ClientAuthProxyTest.java
@@ -137,7 +137,7 @@ private void startServer() throws Exception
startServer(new Handler.Abstract()
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request, Response response, Callback callback)
+ public boolean handle(org.eclipse.jetty.server.Request request, Response response, Callback callback)
{
X509Certificate[] certificates = (X509Certificate[])request.getAttribute(SecureRequestCustomizer.PEER_CERTIFICATES_ATTRIBUTE);
Assertions.assertNotNull(certificates);
diff --git a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ConnectHandlerSSLTest.java b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ConnectHandlerSSLTest.java
index 1f0564f2df13..2b37ade0acac 100644
--- a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ConnectHandlerSSLTest.java
+++ b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ConnectHandlerSSLTest.java
@@ -153,7 +153,7 @@ private SSLSocket wrapSocket(Socket socket) throws Exception
private static class ServerHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
String uri = Request.getPathInContext(request);
if ("/echo".equals(uri))
diff --git a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ConnectHandlerTest.java b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ConnectHandlerTest.java
index d868d893948e..0952c2f6a2e4 100644
--- a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ConnectHandlerTest.java
+++ b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ConnectHandlerTest.java
@@ -895,7 +895,7 @@ public void testCONNECTAndGETAndOutputShutdown() throws Exception
private static class ServerHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
String cp = Request.getPathInContext(request);
switch (cp)
diff --git a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/EmptyServerHandler.java b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/EmptyServerHandler.java
index c6a5a0d9d854..9b09df7df01b 100644
--- a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/EmptyServerHandler.java
+++ b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/EmptyServerHandler.java
@@ -21,7 +21,7 @@
public class EmptyServerHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
callback.succeeded();
return true;
diff --git a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ForwardProxyServerTest.java b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ForwardProxyServerTest.java
index 5923e070fe90..66b8ab7122db 100644
--- a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ForwardProxyServerTest.java
+++ b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ForwardProxyServerTest.java
@@ -236,7 +236,7 @@ public void testIPv6WithXForwardedForHeader(String ipv6) throws Exception
startServer(null, http, new Handler.Abstract.NonBlocking()
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
String remoteHost = org.eclipse.jetty.server.Request.getRemoteAddr(request);
assertThat(remoteHost, Matchers.matchesPattern("\\[.+\\]"));
@@ -275,7 +275,7 @@ public void testIPv6WithForwardedHeader() throws Exception
startServer(null, http, new Handler.Abstract()
{
@Override
- public boolean process(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback)
+ public boolean handle(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
String remoteHost = org.eclipse.jetty.server.Request.getRemoteAddr(request);
assertThat(remoteHost, Matchers.matchesPattern("\\[.+\\]"));
diff --git a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ForwardProxyTLSServerTest.java b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ForwardProxyTLSServerTest.java
index 837dec813089..9bc90ee1b193 100644
--- a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ForwardProxyTLSServerTest.java
+++ b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ForwardProxyTLSServerTest.java
@@ -511,7 +511,7 @@ public void testProxyAuthentication(SslContextFactory.Server proxyTLS) throws Ex
testProxyAuthentication(proxyTLS, new ConnectHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
String proxyAuth = request.getHeaders().get(HttpHeader.PROXY_AUTHORIZATION);
if (proxyAuth == null)
@@ -521,7 +521,7 @@ public boolean process(Request request, Response response, Callback callback) th
callback.succeeded();
return true;
}
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
}, realm);
}
@@ -534,7 +534,7 @@ public void testProxyAuthenticationWithResponseContent(SslContextFactory.Server
testProxyAuthentication(proxyTLS, new ConnectHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
String proxyAuth = request.getHeaders().get(HttpHeader.PROXY_AUTHORIZATION);
if (proxyAuth == null)
@@ -544,7 +544,7 @@ public boolean process(Request request, Response response, Callback callback) th
response.write(true, ByteBuffer.allocate(4096), callback);
return true;
}
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
}, realm);
}
@@ -557,7 +557,7 @@ public void testProxyAuthenticationWithIncludedAddressWithResponseContent(SslCon
testProxyAuthentication(proxyTLS, new ConnectHandler()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
String proxyAuth = request.getHeaders().get(HttpHeader.PROXY_AUTHORIZATION);
if (proxyAuth == null)
@@ -567,7 +567,7 @@ public boolean process(Request request, Response response, Callback callback) th
response.write(true, ByteBuffer.allocate(1024), callback);
return true;
}
- return super.process(request, response, callback);
+ return super.handle(request, response, callback);
}
}, realm, true);
}
@@ -873,7 +873,7 @@ private static void sleep(long ms)
private static class ServerHandler extends Handler.Abstract
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
String uri = Request.getPathInContext(request);
if ("/echo".equals(uri))
diff --git a/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/AsyncListenerTest.java b/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/AsyncListenerTest.java
index bfbed2a4c798..5edbc9771b76 100644
--- a/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/AsyncListenerTest.java
+++ b/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/AsyncListenerTest.java
@@ -32,7 +32,7 @@
import org.eclipse.jetty.server.LocalConnector;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.handler.ErrorProcessor;
+import org.eclipse.jetty.server.handler.ErrorHandler;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Disabled;
@@ -163,7 +163,7 @@ public void testStartAsyncThrowOnErrorSendErrorCustomErrorPage() throws Exceptio
});
// Add a custom error page.
- ErrorProcessor errorProcessor = new ErrorProcessor()
+ ErrorHandler errorHandler = new ErrorHandler()
{
@Override
protected void writeErrorPlain(Request request, PrintWriter writer, int code, String message, Throwable cause, boolean showStacks)
@@ -172,7 +172,7 @@ protected void writeErrorPlain(Request request, PrintWriter writer, int code, St
super.writeErrorPlain(request, writer, code, message, cause, showStacks);
}
};
- server.setErrorProcessor(errorProcessor);
+ server.setErrorHandler(errorHandler);
String httpResponse = connector.getResponse(
"GET /ctx/path HTTP/1.1\r\n" +
@@ -318,7 +318,7 @@ public void testStartAsyncOnTimeoutSendErrorCustomErrorPage() throws Exception
});
// Add a custom error page.
- ErrorProcessor errorProcessor = new ErrorProcessor()
+ ErrorHandler errorHandler = new ErrorHandler()
{
@Override
protected void writeErrorPlain(Request request, PrintWriter writer, int code, String message, Throwable cause, boolean showStacks)
@@ -326,7 +326,7 @@ protected void writeErrorPlain(Request request, PrintWriter writer, int code, St
writer.write("CUSTOM\n");
}
};
- server.setErrorProcessor(errorProcessor);
+ server.setErrorHandler(errorHandler);
String httpResponse = connector.getResponse(
"GET / HTTP/1.1\r\n" +
diff --git a/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/GzipHandlerIsHandledTest.java b/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/GzipHandlerIsHandledTest.java
index 416b2085f3f3..d0492df990fe 100644
--- a/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/GzipHandlerIsHandledTest.java
+++ b/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/GzipHandlerIsHandledTest.java
@@ -116,7 +116,7 @@ public EventHandler(LinkedBlockingQueue events, String action)
}
@Override
- public boolean process(Request request, Response response, Callback callback)
+ public boolean handle(Request request, Response response, Callback callback)
{
events.offer(action);
callback.succeeded();
diff --git a/jetty-ee9/jetty-ee9-servlets/src/test/java/org/eclipse/jetty/ee9/servlets/ThreadStarvationTest.java b/jetty-ee9/jetty-ee9-servlets/src/test/java/org/eclipse/jetty/ee9/servlets/ThreadStarvationTest.java
index 681f3eacbd81..a89444976df6 100644
--- a/jetty-ee9/jetty-ee9-servlets/src/test/java/org/eclipse/jetty/ee9/servlets/ThreadStarvationTest.java
+++ b/jetty-ee9/jetty-ee9-servlets/src/test/java/org/eclipse/jetty/ee9/servlets/ThreadStarvationTest.java
@@ -228,7 +228,7 @@ public boolean flush(ByteBuffer... buffers) throws IOException
_server.setHandler(new Handler.Abstract()
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
int c = count.getAndIncrement();
if (c < parties)
diff --git a/jetty-ee9/jetty-ee9-tests/jetty-ee9-test-integration/src/test/java/org/eclipse/jetty/ee9/test/rfcs/RFC2616BaseTest.java b/jetty-ee9/jetty-ee9-tests/jetty-ee9-test-integration/src/test/java/org/eclipse/jetty/ee9/test/rfcs/RFC2616BaseTest.java
index fa4696a2f6c9..99a831bf52d7 100644
--- a/jetty-ee9/jetty-ee9-tests/jetty-ee9-test-integration/src/test/java/org/eclipse/jetty/ee9/test/rfcs/RFC2616BaseTest.java
+++ b/jetty-ee9/jetty-ee9-tests/jetty-ee9-test-integration/src/test/java/org/eclipse/jetty/ee9/test/rfcs/RFC2616BaseTest.java
@@ -13,7 +13,6 @@
package org.eclipse.jetty.ee9.test.rfcs;
-import java.io.File;
import java.io.IOException;
import java.net.Socket;
import java.nio.file.Path;
@@ -95,7 +94,7 @@ public void setData(String data)
public static class EchoHandler extends Handler.Abstract.NonBlocking
{
@Override
- public boolean process(Request request, Response response, Callback callback) throws Exception
+ public boolean handle(Request request, Response response, Callback callback) throws Exception
{
response.setStatus(200);
String contentType = request.getHeaders().get(HttpHeader.CONTENT_TYPE);