2 # Copyright (c) 2016-2021 by Someone <someone@somenet.org> (aka. Jan Vales <jan@jvales.net>)
3 # published under MIT-License
6 class AbstractWSHandler():
14 # should be overridden by the user
15 def on_register_ws_evtype(self, evtype):
18 # can/should be overridden by the user
19 def on_shutdown(self):
20 """Consider to override. Handles the shutdown-procedure."""
23 # can/should be overridden by the user
24 def on_SIGUSR1(self, sigusr1_cnt):
25 """Consider to override. Handles the SIGUSR1-signal."""
28 # should be overridden by the user
29 def on_WS_EVENT(self, data):
32 # should be overridden by the user
33 # manual command authentication needed!
34 def on_POST_interactive(self, request, data):
37 def _on_register_ws_evtype(self, bot, evtype):
39 self.on_register_ws_evtype(evtype)
41 def _on_shutdown(self):
44 def _on_SIGUSR1(self, sigusr1_cnt):
45 self.on_SIGUSR1(sigusr1_cnt)