mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-28 03:00:16 +00:00
05c9ea5c1d
* sleekxmpp no longer spawns threads for callback handlers -- there are now two threads: one for handlers and one for reading. callback handlers can get results from the read queue directly with the "wait" handler which is used in .send() for the reply catching argument.
21 lines
374 B
Python
21 lines
374 B
Python
|
|
class BaseHandler(object):
|
|
|
|
|
|
def __init__(self, name, matcher):
|
|
self.name = name
|
|
self._destroy = False
|
|
self._payload = None
|
|
self._matcher = matcher
|
|
|
|
def match(self, xml):
|
|
return self._matcher.match(xml)
|
|
|
|
def prerun(self, payload):
|
|
self._payload = payload
|
|
|
|
def run(self, payload):
|
|
self._payload = payload
|
|
|
|
def checkDelete(self):
|
|
return self._destroy
|