bokeh.server.session#
Provides the ServerSession class.
- class ServerSession(session_id: ID, document: Document, io_loop: Loop | None = None, token: str | None = None, executor: _ServerExecutor | None = None)[source]#
Hosts an application “instance” (an instantiated Document) for one or more connections.
- classmethod patch(message: msg.patch_doc, connection: ServerConnection) Awaitable[msg.ok][source]#
Handle a PATCH-DOC, return a Future with work to be scheduled.
- classmethod pull(message: msg.pull_doc_req, connection: ServerConnection) Awaitable[None][source]#
Handle a PULL-DOC, return a Future with work to be scheduled.
- classmethod push(message: msg.push_doc, connection: ServerConnection) Awaitable[msg.ok][source]#
Handle a PUSH-DOC, return a Future with work to be scheduled.
- request_expiration() None[source]#
Used in test suite for now. Forces immediate expiration if no connections.
- subscribe(connection: ServerConnection) None[source]#
This should only be called by
ServerConnection.subscribe_sessionor our book-keeping will be broken
- unsubscribe(connection: ServerConnection) None[source]#
This should only be called by
ServerConnection.unsubscribe_sessionor our book-keeping will be broken