summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/handler/base.py
blob: 810aac910d0b309ec6334b644d3bb1cfdfa0f1b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

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 run(self, payload):
		self._payload = payload
	
	def checkDelete(self):
		return self._destroy