forked from jupyter-server/jupyter_server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge the gateway handlers into the standard handlers.
The two `WebSocketChannelsHandler` and `GatewayResourceHandler` classes are removed and their corresponding functionality is merged into the respective `KernelWebsocketHandler` and `KernelSpecResourceHandler` classes. For the `KernelSpecResourceHandler` class, this change is rather straightforward as we can simply make the existing handler check if the kernel spec manager has a `get_kernel_spec_resource` method, and if so delegate to that method instead of trying to read resources from disk. The `KernelWebsocketHandler` conversion is more complicated, though. The handling of websocket connections was generalized/extended in jupyter-server#1047 to allow the definition of a `kernel_websocket_connection_class` as an alternative to replacing the entire websocket handler. This change builds on that by converting the `GatewayWebSocketClient` class to be an instance of the kernel websocket connection class, and accordingly renames it to `GatewayWebSocketConnection`. When the gateway client is enabled, the default `kernel_websocket_connection_class` is changed to this `GatewayWebSocketConnection` class similarly to how the kernel and kernel spec manager default classes are updated.
- Loading branch information
Showing
3 changed files
with
55 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters