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