-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: Move helper methods to ThreadBlockingHandler
- Loading branch information
Showing
7 changed files
with
99 additions
and
101 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package cask.internal | ||
|
||
import io.undertow.server.{HttpHandler, HttpServerExchange} | ||
|
||
import java.util.concurrent.Executor | ||
|
||
final class ThreadBlockingHandler(executor: Executor, | ||
handler: HttpHandler) | ||
extends HttpHandler { | ||
require(executor != null, "executor should not be null") | ||
|
||
override def handleRequest(exchange: HttpServerExchange): Unit = { | ||
exchange.startBlocking() | ||
exchange.dispatch(executor, handler) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters