Skip to content

Commit

Permalink
Make JettyConnectorThreadPool#newThread public to comply with Jetty 9…
Browse files Browse the repository at this point in the history
….4.22.v20191022

Signed-off-by: Jan Supol <[email protected]>
  • Loading branch information
jansupol committed Nov 5, 2019
1 parent 4c10f29 commit 1504174
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,18 @@ public static Server createServer(final URI uri,
return server;
}

// TODO: Use https://www.eclipse.org/jetty/javadoc/current/org/eclipse/jetty/util/thread/QueuedThreadPool.html
// #%3Cinit%3E(int,int,int,int,java.util.concurrent.BlockingQueue,java.lang.ThreadGroup,java.util.concurrent.ThreadFactory)
//
// Keeping this for backwards compatibility for the time being
private static final class JettyConnectorThreadPool extends QueuedThreadPool {
private final ThreadFactory threadFactory = new ThreadFactoryBuilder()
.setNameFormat("jetty-http-server-%d")
.setUncaughtExceptionHandler(new JerseyProcessingUncaughtExceptionHandler())
.build();

@Override
protected Thread newThread(Runnable runnable) {
public Thread newThread(Runnable runnable) {
return threadFactory.newThread(runnable);
}
}
Expand Down

0 comments on commit 1504174

Please sign in to comment.