bokeh.server.protocol_handler#
Encapsulate handling of all Bokeh Protocol messages a Bokeh server may receive.
- class ProtocolHandler[source]#
A Bokeh server may be expected to receive any of the following protocol messages:
PATCH-DOCPULL-DOC-REQPUSH-DOCSERVER-INFO-REQ
The job of
ProtocolHandleris to direct incoming messages to the right specialized handler for each message type. When the server receives a new message on a connection it will callhandlerwith the message and the connection that the message arrived on. Most messages are ultimately handled by theServerSessionclass, but some simpler messages types such asSERVER-INFO-REQmay be handled directly byProtocolHandler.Any unexpected messages will result in a
ProtocolError.- async handle(message, connection)[source]#
Delegate a received message to the appropriate handler.
- Parameters:
message (Message) – The message that was receive that needs to be handled
connection (ServerConnection) – The connection that received this message
- Raises: